stas            Mon Jun 23 10:09:15 2003 EDT

  Modified files:              
    /php5/ext/standard  string.c 
  Log:
  Fix #24281 - str_replace not updating the count if value is
  not initialized
  
  
Index: php5/ext/standard/string.c
diff -u php5/ext/standard/string.c:1.391 php5/ext/standard/string.c:1.392
--- php5/ext/standard/string.c:1.391    Fri Jun 20 11:41:43 2003
+++ php5/ext/standard/string.c  Mon Jun 23 10:09:14 2003
@@ -18,7 +18,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: string.c,v 1.391 2003/06/20 15:41:43 pollita Exp $ */
+/* $Id: string.c,v 1.392 2003/06/23 14:09:14 stas Exp $ */
 
 /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */
 
@@ -3194,7 +3194,8 @@
                php_str_replace_in_subject(*search, *replace, subject, return_value, 
case_sensitivity, (argc > 3) ? &count : NULL);
        }       
        if (argc > 3) {
-               Z_LVAL_PP(zcount) = count;
+               zval_dtor(*zcount);
+               ZVAL_LONG(*zcount, count);
        }
 }
 /* }}} */



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to