mirror of
https://github.com/php/php-src.git
synced 2024-09-21 18:07:23 +00:00
247105ae1a
Otherwise we leak (and corrupt uninitialized_zval).
24 lines
321 B
PHP
24 lines
321 B
PHP
--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
|