com php-src: Merge branch 'PHP-7.0' into PHP-7.1: Zend/zend_e xceptions.c
| From: | Xinchen Hui | Date: | Sat, 22 Oct 2016 06:50:42 +0000 |
| Subject: | com php-src: Merge branch 'PHP-7.0' into PHP-7.1: Zend/zend_e xceptions.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-95260@lists.php.net to get a copy of this message | ||
Commit: 788368ff1cb7f933076b6eef6210a3c54eddc5dc
Author: Xinchen Hui <laruence@gmail.com> Sat, 22 Oct 2016 14:50:42 +0800
Parents: 2860fd40d6af162b302eec73d462db6ff5113a6a eca84946a4e7269d59ea2d79b5f42117de89ae74
Branches: PHP-7.1 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=788368ff1cb7f933076b6eef6210a3c54eddc5dc
Log:
Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
Fixed bug #73350 (Exception::__toString() cause circular references)
Bugs:
https://bugs.php.net/73350
Changed paths:
MM Zend/zend_exceptions.c
Diff:
diff --cc Zend/zend_exceptions.c
index 331213d,e0aa370..8f41e1c
--- a/Zend/zend_exceptions.c
+++ b/Zend/zend_exceptions.c
@@@ -738,16 -774,17 +738,17 @@@ ZEND_METHOD(exception, __toString
zval_ptr_dtor(&trace);
Z_OBJPROP_P(exception)->u.v.nApplyCount++;
- exception = GET_PROPERTY(exception, "previous");
+ exception = GET_PROPERTY(exception, ZEND_STR_PREVIOUS);
if (exception && Z_TYPE_P(exception) == IS_OBJECT &&
Z_OBJPROP_P(exception)->u.v.nApplyCount > 0) {
- exception = NULL;
+ break;
}
}
- zval_dtor(&fname);
+ zend_string_release(fname);
+ exception = getThis();
/* Reset apply counts */
while (exception && Z_TYPE_P(exception) == IS_OBJECT && (base_ce =
i_get_exception_base(exception)) && instanceof_function(Z_OBJCE_P(exception), base_ce)) {
- if(Z_OBJPROP_P(exception)->u.v.nApplyCount) {
+ if (Z_OBJPROP_P(exception)->u.v.nApplyCount) {
Z_OBJPROP_P(exception)->u.v.nApplyCount--;
} else {
break;