1
0
mirror of https://github.com/php/php-src.git synced 2026-04-26 17:38:14 +02:00
Files
archived-php-src/ext/spl/tests/gh8366.phpt
T
Christoph M. Becker 1762a87932 Fix GH-8366: ArrayIterator may leak when calling __construct()
When we detach an iterator, we also have to delete it.

Closes GH-8374.
2022-04-15 19:05:18 +02:00

10 lines
177 B
PHP

--TEST--
Bug GH-8366 (ArrayIterator may leak when calling __construct())
--FILE--
<?php
$it = new \ArrayIterator();
foreach ($it as $elt) {}
$it->__construct([]);
?>
--EXPECT--