com php-src: Fix bug #67922: Zend/tests/bug67922.phpt Zend/zend_compile.c

From: Date: Thu, 28 Aug 2014 22:18:38 +0000
Subject: com php-src: Fix bug #67922: Zend/tests/bug67922.phpt Zend/zend_compile.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-81276@lists.php.net to get a copy of this message
Commit: ae7e663330b241bf7906551f9e801223aa067dbf Author: Nikita Popov <nikic@php.net> Fri, 29 Aug 2014 00:18:38 +0200 Parents: 389d28597310f98491359af63fe97700d37efc44 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=ae7e663330b241bf7906551f9e801223aa067dbf Log: Fix bug #67922 Bugs: https://bugs.php.net/67922 Changed paths: A Zend/tests/bug67922.phpt M Zend/zend_compile.c Diff: diff --git a/Zend/tests/bug67922.phpt b/Zend/tests/bug67922.phpt new file mode 100644 index 0000000..8be3f2e --- /dev/null +++ b/Zend/tests/bug67922.phpt @@ -0,0 +1,19 @@ +--TEST-- +Bug #67922: Member function not found when dereferencing in write-context +--FILE-- +<?php + +class C { + public function test() { + return new stdClass; + } +} + +$b = new stdClass; +$b->c = new C; +$b->c->test()->d = 'str'; + +?> +===DONE=== +--EXPECT-- +===DONE=== diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index aa3ac72..ed95d7e 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -4369,7 +4369,7 @@ void zend_compile_method_call(znode *result, zend_ast *ast, uint32_t type TSRMLS if (is_this_fetch(obj_ast)) { obj_node.op_type = IS_UNUSED; } else { - zend_compile_var(&obj_node, obj_ast, type TSRMLS_CC); + zend_compile_expr(&obj_node, obj_ast TSRMLS_CC); } zend_compile_expr(&method_node, method_ast TSRMLS_CC);

« previous php.cvs (#81276) next »