1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00
Files
archived-php-src/ext/spl/tests/GlobIterator_constructor_count.phpt
Niels Dossche 1684c52a88 Fix GlobIterator without constructor breaks count() (#18314)
As reported by OpenAI AARDVARK.
2025-04-12 09:59:56 +02:00

15 lines
288 B
PHP

--TEST--
GlobIterator without constructor breaks count()
--FILE--
<?php
$rc = new ReflectionClass(GlobIterator::class);
$in = $rc->newInstanceWithoutConstructor();
try {
count($in);
} catch (Error $e) {
echo $e->getMessage(), "\n";
}
?>
--EXPECT--
GlobIterator is not initialized