1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00
Files
archived-php-src/Zend/tests/gh20564.phpt
Ilija Tovilo 084e409694 Remove zend_exception_save() and zend_exception_restore()
These are leftovers from the pre-PHP-7.0 era. This also implicitly solves
GH-20564 by not clearing exceptions before entering the autoloader.

Closes GH-20256
Fixes GH-20564
2026-01-16 20:18:51 +01:00

25 lines
501 B
PHP

--TEST--
GH-20564: Don't call autoloaders with pending exception
--CREDITS--
Viet Hoang Luu (@vi3tL0u1s)
--FILE--
<?php
class A {
function __call($method, $args) {
eval("<<<ENDOFSTRING\n Test\n ENDOFSTRING;");
spl_autoload_register('A::test');
array_map('B::test', []);
}
}
try {
(new A)->test();
} catch (Throwable $e) {
echo $e->getMessage(), "\n";
}
?>
--EXPECT--
array_map(): Argument #1 ($callback) must be a valid callback or null, class "B" not found