From: Nikita Popov Date: Sat, 19 Jul 2014 10:57:31 +0000 (+0200) Subject: __autoload error X-Git-Tag: POST_AST_MERGE^2~125 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=74dba7e4dbac69531ed1fe896dcc20177247d02f;p=php __autoload error --- diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index a4bd629687..ef0f878694 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -6709,6 +6709,11 @@ void zend_compile_func_decl(znode *result, zend_ast *ast TSRMLS_DC) { } } + if (zend_str_equals(lcname, ZEND_AUTOLOAD_FUNC_NAME) && fn->params->children != 1) { + zend_error_noreturn(E_COMPILE_ERROR, "%s() must take exactly 1 argument", + ZEND_AUTOLOAD_FUNC_NAME); + } + if (is_closure) { opline = emit_op_tmp(result, ZEND_DECLARE_LAMBDA_FUNCTION, NULL, NULL TSRMLS_CC); } else { @@ -6775,8 +6780,6 @@ void zend_compile_func_decl(znode *result, zend_ast *ast TSRMLS_DC) { pass_two(CG(active_op_array) TSRMLS_CC); zend_release_labels(0 TSRMLS_CC); - // TODO.AST __autoload - /* Pop the switch and foreach separators */ zend_stack_del_top(&CG(switch_cond_stack)); zend_stack_del_top(&CG(foreach_copy_stack));