From 65edf44291814c0bd0231b518a10a42e9530796f Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Tue, 30 May 2017 17:37:54 +0300 Subject: [PATCH] Check for possible run-time function name resolution --- Zend/zend_compile.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index 43e65f0ede..2bd721e74c 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -3562,6 +3562,7 @@ int zend_compile_func_cufa(znode *result, zend_ast_list *args, zend_string *lcna if (Z_TYPE_P(name) == IS_STRING && zend_string_equals_literal_ci(Z_STR_P(name), "array_slice") + && (!FC(current_namespace) || args->child[1]->child[0]->attr == ZEND_NAME_FQ) && list->children == 3 && list->child[1]->kind == ZEND_AST_ZVAL) { zval *zv = zend_ast_get_zval(list->child[1]); @@ -3845,6 +3846,7 @@ int zend_compile_func_array_slice(znode *result, zend_ast_list *args) /* {{{ */ if (Z_TYPE_P(name) == IS_STRING && zend_string_equals_literal_ci(Z_STR_P(name), "func_get_args") + && (!FC(current_namespace) || args->child[0]->child[0]->attr == ZEND_NAME_FQ) && list->children == 0 && Z_TYPE_P(zv) == IS_LONG && Z_LVAL_P(zv) >= 0) { -- 2.40.0