]> granicus.if.org Git - php/commitdiff
Merge branch 'PHP-7.4'
authorNikita Popov <nikita.ppv@gmail.com>
Tue, 7 Jul 2020 09:59:56 +0000 (11:59 +0200)
committerNikita Popov <nikita.ppv@gmail.com>
Tue, 7 Jul 2020 10:00:34 +0000 (12:00 +0200)
* PHP-7.4:
  Fixed bug #79792

1  2 
Zend/tests/bug79792.phpt
Zend/zend_hash.c

index 0000000000000000000000000000000000000000,85b98a907b603ff0aa806c24f8ff761563451736..ca662e27e96bc061dc67eed35d53130c3cf40398
mode 000000,100644..100644
--- /dev/null
@@@ -1,0 -1,16 +1,16 @@@
 -Warning: Invalid argument supplied for foreach() in %s on line %d
+ --TEST--
+ Bug #79792: HT iterators not removed if empty array is destroyed
+ --FILE--
+ <?php
+ $a = [42];
+ foreach ($a as &$c) {
+     // Make the array empty.
+     unset($a[0]);
+     // Destroy the array.
+     $a = null;
+ }
+ ?>
+ ===DONE===
+ --EXPECTF--
++Warning: foreach() argument must be of type array|object, null given in %s on line %d
+ ===DONE===
Simple merge