From 7d4fd3fd380a7fe9b497684775a38190786b93ba Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Thu, 27 Nov 2008 19:01:23 +0000 Subject: Fixed bug #46409 (__invoke method called outside of object context when using array_map) --- Zend/zend_interfaces.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Zend/zend_interfaces.c') diff --git a/Zend/zend_interfaces.c b/Zend/zend_interfaces.c index e744ff413a..b4edac5aee 100755 --- a/Zend/zend_interfaces.c +++ b/Zend/zend_interfaces.c @@ -46,7 +46,7 @@ ZEND_API zval* zend_call_method(zval **object_pp, zend_class_entry *obj_ce, zend fci.size = sizeof(fci); /*fci.function_table = NULL; will be read form zend_class_entry of object if needed */ - fci.object_pp = object_pp; + fci.object_ptr = object_pp ? *object_pp : NULL; fci.function_name = &z_fname; fci.retval_ptr_ptr = retval_ptr_ptr ? retval_ptr_ptr : &retval; fci.param_count = param_count; @@ -85,7 +85,7 @@ ZEND_API zval* zend_call_method(zval **object_pp, zend_class_entry *obj_ce, zend } fcic.calling_scope = obj_ce; fcic.called_scope = object_pp ? obj_ce : EG(called_scope); - fcic.object_pp = object_pp; + fcic.object_ptr = object_pp ? *object_pp : NULL; result = zend_call_function(&fci, &fcic TSRMLS_CC); } if (result == FAILURE) { -- cgit v1.2.1