Otherwise we leak (and corrupt uninitialized_zval).
--- /dev/null
+--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
}
return;
}
+ if (UNEXPECTED(EG(exception))) {
+ ZVAL_ERROR(result);
+ return;
+ }
} else if (UNEXPECTED(Z_ISERROR_P(ptr))) {
ZVAL_ERROR(result);
return;