iliaa           Mon Dec  6 18:30:38 2004 EDT

  Modified files:              
    /php-src/ext/standard       file.c 
  Log:
  Fixed bug #30990 (allow popen() on *NIX to accept 'b' flag).
  
  
http://cvs.php.net/diff.php/php-src/ext/standard/file.c?r1=1.391&r2=1.392&ty=u
Index: php-src/ext/standard/file.c
diff -u php-src/ext/standard/file.c:1.391 php-src/ext/standard/file.c:1.392
--- php-src/ext/standard/file.c:1.391   Thu Oct 28 20:37:22 2004
+++ php-src/ext/standard/file.c Mon Dec  6 18:30:37 2004
@@ -21,7 +21,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: file.c,v 1.391 2004/10/29 00:37:22 andi Exp $ */
+/* $Id: file.c,v 1.392 2004/12/06 23:30:37 iliaa Exp $ */
 
 /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */
 
@@ -834,6 +834,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

Reply via email to