mirror of
https://github.com/php/php-src.git
synced 2024-11-24 10:24:11 +08:00
Fixed bug #30080 (Passing array or non array of objects)
This commit is contained in:
parent
6b39b374ef
commit
89e53d5ab2
18
Zend/tests/bug30080.phpt
Executable file
18
Zend/tests/bug30080.phpt
Executable file
@ -0,0 +1,18 @@
|
||||
--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) {
|
||||
}
|
||||
}
|
@ -972,7 +972,8 @@ void zend_do_free(znode *op1 TSRMLS_DC)
|
||||
* 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;
|
||||
|
Loading…
Reference in New Issue
Block a user