Skip to content

Commit 0ccd215

Browse files
committed
make a copy of the empty string
1 parent 4ac9b82 commit 0ccd215

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Zend/zend_namespaces.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ static zend_class_entry *insert_namespace(const zend_string *name) {
8383

8484
zend_class_entry *zend_resolve_namespace(zend_string *name) {
8585
if (global_namespace == NULL) {
86-
global_namespace = create_namespace(zend_empty_string);
86+
global_namespace = create_namespace(zend_string_copy(zend_empty_string));
8787
global_namespace->lexical_scope = NULL;
8888
zend_hash_init(&namespaces, 8, NULL, ZEND_CLASS_DTOR, 1);
8989
zend_hash_add_ptr(&namespaces, zend_empty_string, global_namespace);

0 commit comments

Comments
 (0)