Re: Bug #24281
| From: | Marco Tabini | Date: | Sun, 22 Jun 2003 13:29:28 +0000 |
| Subject: | Re: Bug #24281 | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-2534@lists.php.net to get a copy of this message | ||
Take two (this time hopefully clearing the variable before resetting it):
Index: string.c
===================================================================
RCS file: /repository/php4/ext/standard/string.c,v
retrieving revision 1.391
diff -u -r1.391 string.c
--- string.c 20 Jun 2003 15:41:43 -0000 1.391
+++ string.c 22 Jun 2003 13:29:22 -0000
@@ -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);
}
}
/* }}} */