xref: /PHP-7.3/Zend/tests/bug36303.phpt (revision 9b87b73f)
1--TEST--
2Bug #36303 (foreach on error_zval produces segfault)
3--FILE--
4<?php
5$x="test";
6foreach($x->a->b as &$v) {
7}
8echo "ok\n";
9?>
10--EXPECTF--
11Warning: Attempt to modify property 'a' of non-object in %sbug36303.php on line 3
12
13Warning: Invalid argument supplied for foreach() in %sbug36303.php on line 3
14ok
15