Merge branch 'PHP-7.4'

* PHP-7.4:
  Property handle read_property exception in fetch_property_address
This commit is contained in:
Nikita Popov 2020-08-26 16:12:56 +02:00
commit e069032e5c
2 changed files with 27 additions and 0 deletions

View File

@ -0,0 +1,23 @@
--TEST--
Exception thrown by __get() during =& assignment
--FILE--
<?php
class Test {
private $x;
public function &__get($name) {
throw new Exception("Foobar");
}
}
$test = new Test;
$y = 5;
try {
$test->x =& $y;
} catch (Exception $e) {
echo $e->getMessage(), "\n";
}
?>
--EXPECT--
Foobar

View File

@ -2783,6 +2783,10 @@ static zend_always_inline void zend_fetch_property_address(zval *result, zval *c
}
goto end;
}
if (UNEXPECTED(EG(exception))) {
ZVAL_ERROR(result);
goto end;
}
} else if (UNEXPECTED(Z_ISERROR_P(ptr))) {
ZVAL_ERROR(result);
goto end;