From: Dmitry Stogov Date: Wed, 22 Sep 2004 07:12:15 +0000 (+0000) Subject: Fixed bug #29566 (foreach/string handling strangeness (crash)). X-Git-Tag: php-5.0.2~6 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9062b2f9673fc3c222209af3a31d85801853b246;p=php Fixed bug #29566 (foreach/string handling strangeness (crash)). --- diff --git a/NEWS b/NEWS index a9c8d9dc09..277048dac8 100644 --- a/NEWS +++ b/NEWS @@ -41,6 +41,7 @@ PHP NEWS - Fixed bug #29657 (xml_* functions throw non descriptive error). (Christian, Rob) - Fixed bug #29656 (segfault on result and statement properties). (Georg) +- Fixed bug #29566 (foreach/string handling strangeness (crash)). (Dmitry) - Fixed bug #29447 (Reflection API issues). (Marcus) - Fixed bug #29296 (Added sslv2 and sslv3 transports). (Wez) - Fixed bug #29283 (Invalid statement handle in mysqli on execute). (Georg) diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index 0c205b86fc..2e69f5a1c7 100644 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@ -3709,7 +3709,7 @@ int zend_fe_reset_handler(ZEND_OPCODE_HANDLER_ARGS) if (opline->extended_value) { array_ptr_ptr = get_zval_ptr_ptr(&opline->op1, EX(Ts), BP_VAR_R); if (array_ptr_ptr == NULL) { - MAKE_STD_ZVAL(array_ptr); + ALLOC_INIT_ZVAL(array_ptr); } else if (Z_TYPE_PP(array_ptr_ptr) == IS_OBJECT) { ce = Z_OBJCE_PP(array_ptr_ptr); if (!ce || ce->get_iterator == NULL) {