com php-src: Restored original EG(scope) behavior when call object methods: Zend/zend_vm_def.h Zend/zend_vm_execute.h

From: Date: Mon, 05 May 2014 22:04:05 +0000
Subject: com php-src: Restored original EG(scope) behavior when call object methods: Zend/zend_vm_def.h Zend/zend_vm_execute.h
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-78108@lists.php.net to get a copy of this message
Commit: 28a81353313e251e32658cc455cf30913bbc2bd8 Author: Dmitry Stogov <dmitry@zend.com> Tue, 6 May 2014 02:04:05 +0400 Parents: 1606a9a36a40423008615e2fe1c8a465e8c99747 Branches: phpng Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=28a81353313e251e32658cc455cf30913bbc2bd8 Log: Restored original EG(scope) behavior when call object methods Changed paths: M Zend/zend_vm_def.h M Zend/zend_vm_execute.h Diff: diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h index 2538e86..c0d88ea 100644 --- a/Zend/zend_vm_def.h +++ b/Zend/zend_vm_def.h @@ -1938,8 +1938,13 @@ ZEND_VM_HELPER(zend_do_fcall_common_helper, ANY, ANY) if (fbc->common.scope) { should_change_scope = 1; Z_OBJ(EG(This)) = object; -//??? EG(scope) = (object) ? NULL : fbc->common.scope; + /* TODO: we don't set scope if we call an object method ??? */ + /* See: ext/pdo_sqlite/tests/pdo_fetch_func_001.phpt */ +#if 1 + EG(scope) = (object) ? NULL : fbc->common.scope; +#else EG(scope) = fbc->common.scope; +#endif EG(called_scope) = EX(call)->called_scope; } diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h index 6abc07d..da7c59a 100644 --- a/Zend/zend_vm_execute.h +++ b/Zend/zend_vm_execute.h @@ -548,8 +548,13 @@ static int ZEND_FASTCALL zend_do_fcall_common_helper_SPEC(ZEND_OPCODE_HANDLER_AR if (fbc->common.scope) { should_change_scope = 1; Z_OBJ(EG(This)) = object; -//??? EG(scope) = (object) ? NULL : fbc->common.scope; + /* TODO: we don't set scope if we call an object method ??? */ + /* See: ext/pdo_sqlite/tests/pdo_fetch_func_001.phpt */ +#if 1 + EG(scope) = (object) ? NULL : fbc->common.scope; +#else EG(scope) = fbc->common.scope; +#endif EG(called_scope) = EX(call)->called_scope; }

« previous php.cvs (#78108) next »