mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0: Fixed bug #73350 (Exception::__toString() cause circular references)
This commit is contained in:
commit
788368ff1c
3 changed files with 31 additions and 3 deletions
|
@ -740,14 +740,15 @@ ZEND_METHOD(exception, __toString)
|
|||
Z_OBJPROP_P(exception)->u.v.nApplyCount++;
|
||||
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;
|
||||
}
|
||||
}
|
||||
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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue