1
0
mirror of https://github.com/php/php-src.git synced 2026-04-20 14:31:06 +02:00
Files
archived-php-src/Zend/tests/nullsafe_operator/039.phpt
Nikita Popov 3c53732332 Fix undef var exception handling in JMP_NULL
We need to initialize the result variable in the exceptional
case as well.

Fixes oss-fuzz #25526.
2020-09-15 15:44:01 +02:00

19 lines
266 B
PHP

--TEST--
Handling of undef variable exception in JMP_NULL
--FILE--
<?php
set_error_handler(function($_, $m) {
throw new Exception($m);
});
try {
$foo?->foo;
} catch (Exception $e) {
echo $e->getMessage(), "\n";
}
?>
--EXPECT--
Undefined variable $foo