iliaa Mon Dec 6 18:31:58 2004 EDT
Modified files: (Branch: PHP_4_3)
/php-src NEWS
/php-src/ext/standard file.c
Log:
MFH: Fixed bug #30990 (allow popen() on *NIX to accept 'b' flag).
http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1247.2.761&r2=1.1247.2.762&ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.1247.2.761 php-src/NEWS:1.1247.2.762
--- php-src/NEWS:1.1247.2.761 Mon Dec 6 14:44:32 2004
+++ php-src/NEWS Mon Dec 6 18:31:57 2004
@@ -1,6 +1,7 @@
PHP 4 NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? Nov 2004, Version 4.3.10
+- Fixed bug #30990 (allow popen() on *NIX to accept 'b' flag).
23 Nov 2004, Version 4.3.10RC1
- Added the %F modifier to *printf to render a non-locale-aware representation
http://cvs.php.net/diff.php/php-src/ext/standard/file.c?r1=1.279.2.65&r2=1.279.2.66&ty=u
Index: php-src/ext/standard/file.c
diff -u php-src/ext/standard/file.c:1.279.2.65
php-src/ext/standard/file.c:1.279.2.66
--- php-src/ext/standard/file.c:1.279.2.65 Thu Oct 28 20:38:44 2004
+++ php-src/ext/standard/file.c Mon Dec 6 18:31:58 2004
@@ -21,7 +21,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: file.c,v 1.279.2.65 2004/10/29 00:38:44 andi Exp $ */
+/* $Id: file.c,v 1.279.2.66 2004/12/06 23:31:58 iliaa Exp $ */
/* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */
@@ -1198,6 +1198,14 @@
convert_to_string_ex(arg1);
convert_to_string_ex(arg2);
p = estrndup(Z_STRVAL_PP(arg2), Z_STRLEN_PP(arg2));
+#ifndef PHP_WIN32
+ {
+ char *z = memchr(p, 'b', Z_STRLEN_PP(arg2));
+ if (z) {
+ memmove(p + (z - p), z + 1, Z_STRLEN_PP(arg2) - (z -
p));
+ }
+ }
+#endif
if (PG(safe_mode)){
b = strchr(Z_STRVAL_PP(arg1), ' ');
if (!b) {
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php