diff options
author | Nikita Popov <nikic@php.net> | 2015-11-26 16:56:08 +0100 |
---|---|---|
committer | Nikita Popov <nikic@php.net> | 2015-11-26 16:56:08 +0100 |
commit | 99dd7ee80ba6865dfbf742935f9aadab1d65801c (patch) | |
tree | e9dc3afd886872fbabc4de213c0e8ddc99142ccf /Zend/zend_compile.c | |
parent | 0e91e5fb909591a8d57587eeb19314e4a4ee01d9 (diff) | |
download | php-git-99dd7ee80ba6865dfbf742935f9aadab1d65801c.tar.gz |
Forbid namespace\int type hint as well
Diffstat (limited to 'Zend/zend_compile.c')
-rw-r--r-- | Zend/zend_compile.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index 9805df055c..0e633b724a 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -4383,8 +4383,10 @@ static void zend_compile_typename(zend_ast *ast, zend_arg_info *arg_info) /* {{{ zend_uchar type = zend_lookup_builtin_type_by_name(class_name); if (type != 0) { - if (ast->attr == ZEND_NAME_FQ) { - zend_error_noreturn(E_COMPILE_ERROR, "Cannot use the scalar type '%s' as fully qualified with a leading backslash", ZSTR_VAL(zend_string_tolower(class_name))); + if (ast->attr != ZEND_NAME_NOT_FQ) { + zend_error_noreturn(E_COMPILE_ERROR, + "Scalar type declaration '%s' must be unqualified", + ZSTR_VAL(zend_string_tolower(class_name))); } arg_info->type_hint = type; } else { |