From: Zeev Suraski Date: Wed, 2 Feb 2000 22:23:37 +0000 (+0000) Subject: - Fix built-in classes with more than 5 methods X-Git-Tag: BEFORE_SAPIFICATION_FEB_10_2000~98 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8b9e07daceb051935deeef458d8880ec488e2b0b;p=php - Fix built-in classes with more than 5 methods --- diff --git a/Zend/zend_API.c b/Zend/zend_API.c index d338f72521..9be8cc2853 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -900,12 +900,13 @@ ZEND_API zend_class_entry *register_internal_class(zend_class_entry *class_entry zend_hash_init(&class_entry->default_properties, 0, NULL, ZVAL_PTR_DTOR, 1); zend_hash_init(&class_entry->function_table, 0, NULL, ZEND_FUNCTION_DTOR, 1); - zend_hash_update(CG(class_table), lowercase_name, class_entry->name_length+1, class_entry, sizeof(zend_class_entry), (void **) ®ister_class); - free(lowercase_name); - + if (class_entry->builtin_functions) { zend_register_functions(class_entry->builtin_functions, &class_entry->function_table); } + + zend_hash_update(CG(class_table), lowercase_name, class_entry->name_length+1, class_entry, sizeof(zend_class_entry), (void **) ®ister_class); + free(lowercase_name); return register_class; }