]> 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 05cbcc4a273c2900543201b78b7b91ee9decc251..c10f965ab9f180d398647063eb447713d7387736 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) );