From: Xinchen Hui Date: Thu, 2 Jul 2015 04:31:26 +0000 (+0800) Subject: Use hash_str directly X-Git-Tag: php-7.1.0alpha3~25^2~60 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3422fb57c88cdb82868b845e0690569c376f080c;p=php Use hash_str directly --- diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c index fe371ee61a..1a5ba2e5dd 100644 --- a/Zend/zend_builtin_functions.c +++ b/Zend/zend_builtin_functions.c @@ -2689,11 +2689,12 @@ ZEND_FUNCTION(get_extension_funcs) } if (strncasecmp(ZSTR_VAL(extension_name), "zend", sizeof("zend"))) { lcname = zend_string_tolower(extension_name); + module = zend_hash_find_ptr(&module_registry, lcname); + zend_string_release(lcname); } else { - lcname = zend_string_init("core", sizeof("core")-1, 0); + module = zend_hash_str_find_ptr(&module_registry, "core", sizeof("core") - 1); } - module = zend_hash_find_ptr(&module_registry, lcname); - zend_string_release(lcname); + if (!module) { RETURN_FALSE; }