diff options
Diffstat (limited to 'ext/spl/tests/bug31346.phpt')
| -rw-r--r-- | ext/spl/tests/bug31346.phpt | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/ext/spl/tests/bug31346.phpt b/ext/spl/tests/bug31346.phpt new file mode 100644 index 0000000..9b5618e --- /dev/null +++ b/ext/spl/tests/bug31346.phpt @@ -0,0 +1,19 @@ +--TEST-- +Bug #31486 (ArrayIterator::next segfaults) +--FILE-- +<?php +$obj = new stdClass; +$obj->var1=1; + +$ao = new ArrayObject($obj); + +$i = $ao->getIterator(); + +$ao->offsetUnset($i->key()); +$i->next(); + +?> +===DONE=== +--EXPECTF-- +Notice: ArrayIterator::next(): Array was modified outside object and internal position is no longer valid in %sbug31346.php on line %d +===DONE=== |
