diff --git a/Zend/tests/typehints/fq_nullable.phpt b/Zend/tests/typehints/fq_nullable.phpt new file mode 100644 index 00000000000..24ba2ffa620 --- /dev/null +++ b/Zend/tests/typehints/fq_nullable.phpt @@ -0,0 +1,13 @@ +--TEST-- +Fully-qualified nullable parameter type +--FILE-- + +===DONE=== +--EXPECT-- +===DONE=== diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index fc77c6ad2f8..b61a8195282 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -5140,6 +5140,7 @@ void zend_compile_params(zend_ast *ast, zend_ast *return_type_ast) /* {{{ */ op_array->fn_flags |= ZEND_ACC_HAS_TYPE_HINTS; arg_info->allow_null = has_null_default || is_explicitly_nullable; + type_ast->attr &= ~ZEND_TYPE_NULLABLE; zend_compile_typename(type_ast, arg_info); if (arg_info->type_hint == IS_VOID) {