php-src/Zend/tests/exception_in_rope_end.phpt
Nikita Popov 89ce8d28de Fix crash when exception is thrown during ROPE_END
The CHECK_EXCEPTION() was done at a point where the old opline is
still used, thus redirecting the write to the result var into
EX(call) instead.

Handling the exception in-place to avoid leaking result.
2015-07-06 20:15:45 +02:00

18 lines
235 B
PHP

--TEST--
Exception during rope finalization
--FILE--
<?php
set_error_handler(function() { throw new Exception; });
try {
$b = "foo";
$str = "y$b$a";
} catch (Exception $e) {
echo "Exception\n";
}
?>
--EXPECT--
Exception