mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
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
25 lines
501 B
PHP
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
|