1
0
mirror of https://github.com/php/php-src.git synced 2026-03-26 01:02:25 +01:00
Files
archived-php-src/ext/spl/tests/bug79987.phpt

20 lines
457 B
PHP

--TEST--
Bug #79987 (Memory leak in SplFileInfo because of missing zend_restore_error_handling())
--FILE--
<?php
class BadSplFileInfo extends SplFileInfo {
public function __construct() {
}
}
$x = new BadSplFileInfo();
set_error_handler(function ($type, $msg, $file, $line, $context = []) {
echo "ops\n";
});
try {
var_dump($x->getLinkTarget());
} catch (Throwable $e) {
echo $e->getMessage() . "\n";
}
--EXPECT--
Object not initialized