]> granicus.if.org Git - php/commitdiff
- fix possible EOL conversion on svn co on windows
authorPierre Joye <pajoye@php.net>
Thu, 28 Jan 2010 00:05:37 +0000 (00:05 +0000)
committerPierre Joye <pajoye@php.net>
Thu, 28 Jan 2010 00:05:37 +0000 (00:05 +0000)
ext/standard/tests/file/fflush_basic.phpt

index 5cd81d7aa2a801577f7d008f37beb346c61a7a7c..7e8cba7188bae23570d944a4b1085cf4ddd00ee6 100755 (executable)
@@ -20,6 +20,9 @@ $filename = "$file_path/fflush_basic.tmp";
 $file_handle = fopen($filename, "w");
 if($file_handle == false)
   exit("Error:failed to open file $filename");
+if(substr(PHP_OS, 0, 3) == "WIN")  {
+       $data = str_replace("\r",'', $data);
+}
 
 // writing data to the file
 var_dump( fwrite($file_handle, $data) );