From: Ilia Alshanetsky Date: Mon, 16 Mar 2009 00:39:09 +0000 (+0000) Subject: MFB53: Fix for get_defined_constants() X-Git-Tag: php-5.2.10RC1~296 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9075bfd1d938812979b6adf89cac313b06b5167d;p=php MFB53: Fix for get_defined_constants() --- diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c index b80ce5e547..0dde8b1bc5 100644 --- a/Zend/zend_builtin_functions.c +++ b/Zend/zend_builtin_functions.c @@ -1617,7 +1617,8 @@ ZEND_FUNCTION(get_defined_constants) module_names[0] = "internal"; zend_hash_internal_pointer_reset_ex(&module_registry, &pos); while (zend_hash_get_current_data_ex(&module_registry, (void *) &module, &pos) != FAILURE) { - module_names[i++] = module->name; + module_names[module->module_number] = module->name; + i++; zend_hash_move_forward_ex(&module_registry, &pos); } module_names[i] = "user";