Skip to content

Commit e66b91c

Browse files
author
Ilia Alshanetsky
committed
Fixed bug #47549 (get_defined_constants() return array with broken array categories)
1 parent 627caef commit e66b91c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Zend/zend_builtin_functions.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -1814,7 +1814,8 @@ ZEND_FUNCTION(get_defined_constants)
18141814
module_names[0] = "internal";
18151815
zend_hash_internal_pointer_reset_ex(&module_registry, &pos);
18161816
while (zend_hash_get_current_data_ex(&module_registry, (void *) &module, &pos) != FAILURE) {
1817-
module_names[i++] = (char*)module->name;
1817+
module_names[module->module_number] = (char *)module->name;
1818+
i++;
18181819
zend_hash_move_forward_ex(&module_registry, &pos);
18191820
}
18201821
module_names[i] = "user";

0 commit comments

Comments
 (0)