From: foobar Date: Wed, 25 Feb 2004 23:38:03 +0000 (+0000) Subject: - Fixed bug #27368 (php.ini-* has lone CR in the end) X-Git-Tag: RELEASE_0_2_0~155 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=44dfac9d9633e0725dd21f0507db6dc0b3a656a1;p=php - Fixed bug #27368 (php.ini-* has lone CR in the end) # regex taken from win32/sendmail.c (suggested by Sara) # And Andrei invited Wez to his speech on the cruise.. :) --- diff --git a/win32/build/mkdist.php b/win32/build/mkdist.php index 646e9cdadc..bb8017af82 100644 --- a/win32/build/mkdist.php +++ b/win32/build/mkdist.php @@ -128,7 +128,7 @@ function copy_file_list($source_dir, $dest_dir, $list) function copy_text_file($source, $dest) { $text = file_get_contents($source); - $text = preg_replace("/[^\r]\n$/", "\r\n", $text); + $text = preg_replace("/(\r\n?)|\n/", "\r\n", $text); $fp = fopen($dest, "w"); fwrite($fp, $text); fclose($fp); @@ -161,6 +161,7 @@ $text_files = array( "NEWS" => "news.txt", "php.ini-dist" => "php.ini-dist", "php.ini-recommended" => "php.ini-recommended", + "win32/install.txt" => "install.txt", ); foreach ($text_files as $src => $dest) { @@ -169,7 +170,6 @@ foreach ($text_files as $src => $dest) { /* general other files */ $general_files = array( - "win32/install.txt" => "install.txt", "php.gif" => "php.gif", );