I haven't tracked down in detail where the interaction with
increment_function comes from, but the root problem here is failure
to handle the illegal offset type exception.
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? ????, PHP 8.0.0alpha3
+- Core:
+ . Fixed bug #79790 ("Illegal offset type" exception during AST evaluation
+ not handled properly). (Nikita)
09 Jul 2020, PHP 8.0.0alpha2
--- /dev/null
+--TEST--
+Bug #79790: "Illegal offset type" exception during AST evaluation not handled properly
+--FILE--
+<?php
+b();
+function b($a = array()[array ()]) {
+ ++$c[function () {}];
+}
+?>
+--EXPECTF--
+Fatal error: Uncaught TypeError: Illegal offset type in %s:%d
+Stack trace:
+#0 %s(%d): b()
+#1 {main}
+ thrown in %s on line %d
zval_ptr_dtor_nogc(&op1);
zval_ptr_dtor_nogc(&op2);
+ if (UNEXPECTED(EG(exception))) {
+ return FAILURE;
+ }
}
break;
default: