com php-src: Fixed EG(error_zval) handling: Zend/ze nd_execute.c

From: Date: Tue, 25 Feb 2014 19:39:25 +0000
Subject: com php-src: Fixed EG(error_zval) handling: Zend/ze nd_execute.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-77891@lists.php.net to get a copy of this message
Commit: 329a576f39ba8bf759d44007f185986669b3901a Author: Dmitry Stogov <dmitry@zend.com> Tue, 25 Feb 2014 23:39:25 +0400 Parents: f0e9a108a7f70d5bd2246bcead9f0cb179e836b2 Branches: phpng Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=329a576f39ba8bf759d44007f185986669b3901a Log: Fixed EG(error_zval) handling Changed paths: M Zend/zend_execute.c Diff: diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index 322fe46..9bdee5c 100644 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@ -1383,7 +1383,7 @@ static void zend_fetch_property_address(zval *result, zval *container, zval *pro { if (Z_TYPE_P(container) != IS_OBJECT) { if (container == &EG(error_zval)) { - result = &EG(error_zval); + ZVAL_INDIRECT(result, &EG(error_zval)); return; } @@ -1398,7 +1398,7 @@ static void zend_fetch_property_address(zval *result, zval *container, zval *pro object_init(container); } else { zend_error(E_WARNING, "Attempt to modify property of non-object"); - result = &EG(error_zval); + ZVAL_INDIRECT(result, &EG(error_zval)); return; } } @@ -1408,7 +1408,8 @@ static void zend_fetch_property_address(zval *result, zval *container, zval *pro if (NULL == ptr) { if (Z_OBJ_HT_P(container)->read_property && (ptr = Z_OBJ_HT_P(container)->read_property(container, prop_ptr, type, key TSRMLS_CC)) != NULL) { - ZVAL_COPY(result, ptr); +//??? ZVAL_COPY(result, ptr); + ZVAL_INDIRECT(result, ptr); } else { zend_error_noreturn(E_ERROR, "Cannot access undefined property for object with overloaded property access"); } @@ -1418,10 +1419,11 @@ static void zend_fetch_property_address(zval *result, zval *container, zval *pro } } else if (Z_OBJ_HT_P(container)->read_property) { zval *ptr = Z_OBJ_HT_P(container)->read_property(container, prop_ptr, type, key TSRMLS_CC); - ZVAL_COPY(result, ptr); +//??? ZVAL_COPY(result, ptr); + ZVAL_INDIRECT(result, ptr); } else { zend_error(E_WARNING, "This object doesn't support property references"); - result = &EG(error_zval); + ZVAL_INDIRECT(result, &EG(error_zval)); } }

« previous php.cvs (#77891) next »