--- /dev/null
+--TEST--
+Bug #30080 (Passing array or non array of objects)
+--FILE--
+<?php
+class foo {
+ function foo($arrayobj) {
+ var_dump($arrayobj);
+ }
+}
+
+new foo(array(new stdClass));
+?>
+--EXPECT--
+array(1) {
+ [0]=>
+ object(stdClass)#2 (0) {
+ }
+}
* Find JMP_NO_CTOR, mark the preceding ASSIGN and the
* proceeding INIT_FCALL_BY_NAME as unused
*/
- if (opline->opcode == ZEND_JMP_NO_CTOR) {
+ if (opline->opcode == ZEND_JMP_NO_CTOR &&
+ opline->op1.u.var == op1->u.var) {
opline->op1.u.EA.type |= EXT_TYPE_UNUSED;
(opline-1)->result.u.EA.type |= EXT_TYPE_UNUSED;
(opline+1)->op1.u.EA.type |= EXT_TYPE_UNUSED;