diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c index 4ec32ca1877..d424e728f7f 100644 --- a/Zend/zend_builtin_functions.c +++ b/Zend/zend_builtin_functions.c @@ -1082,6 +1082,9 @@ ZEND_FUNCTION(get_declared_classes) } } + if(!Z_STRVAL_PP(namespace_name) || !Z_STRLEN_PP(namespace_name)) { + global_ns = 1; + } if(!global_ns) { convert_to_string_ex(namespace_name);