summaryrefslogtreecommitdiff
path: root/Zend/zend_compile.c
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/zend_compile.c')
-rw-r--r--Zend/zend_compile.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c
index c289fefb9e..9a904eefa8 100644
--- a/Zend/zend_compile.c
+++ b/Zend/zend_compile.c
@@ -5523,11 +5523,13 @@ static void zend_begin_func_decl(znode *result, zend_op_array *op_array, zend_as
}
}
- if (zend_string_equals_literal(lcname, ZEND_AUTOLOAD_FUNC_NAME)
- && zend_ast_get_list(params_ast)->children != 1
- ) {
- zend_error_noreturn(E_COMPILE_ERROR, "%s() must take exactly 1 argument",
- ZEND_AUTOLOAD_FUNC_NAME);
+ if (zend_string_equals_literal(lcname, ZEND_AUTOLOAD_FUNC_NAME)) {
+ if (zend_ast_get_list(params_ast)->children != 1) {
+ zend_error_noreturn(E_COMPILE_ERROR, "%s() must take exactly 1 argument",
+ ZEND_AUTOLOAD_FUNC_NAME);
+ }
+
+ zend_error(E_DEPRECATED, "__autoload() is deprecated, use spl_autoload_register() instead");
}
key = zend_build_runtime_definition_key(lcname, decl->lex_pos);