From 43f278ccafbf7612a596b5a7aa4fda415c00004a Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Thu, 7 Aug 2008 12:04:14 +0000 Subject: Fixed bug #45744 (Case sensitive callback behaviour) --- Zend/zend_API.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Zend/zend_API.c') diff --git a/Zend/zend_API.c b/Zend/zend_API.c index bf76f7b55d..da7548f407 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -2472,7 +2472,6 @@ static int zend_is_callable_check_func(int check_flags, zval *callable, zend_fca retval = fcc->function_handler ? 1 : 0; call_via_handler = 1; } - efree(lmname); if (retval) { if (fcc->calling_scope && !call_via_handler) { @@ -2507,7 +2506,7 @@ static int zend_is_callable_check_func(int check_flags, zval *callable, zend_fca } if (retval && (check_flags & IS_CALLABLE_CHECK_NO_ACCESS) == 0) { if (fcc->function_handler->op_array.fn_flags & ZEND_ACC_PRIVATE) { - if (!zend_check_private(fcc->function_handler, fcc->object_pp ? Z_OBJCE_PP(fcc->object_pp) : EG(scope), mname, mlen TSRMLS_CC)) { + if (!zend_check_private(fcc->function_handler, fcc->object_pp ? Z_OBJCE_PP(fcc->object_pp) : EG(scope), lmname, mlen TSRMLS_CC)) { if (error) { if (*error) { efree(*error); @@ -2536,6 +2535,8 @@ static int zend_is_callable_check_func(int check_flags, zval *callable, zend_fca if (error) zend_spprintf(error, 0, "function '%s' does not exist", mname); } } + efree(lmname); + if (fcc->object_pp) { fcc->called_scope = Z_OBJCE_PP(fcc->object_pp); } -- cgit v1.2.1