Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions Zend/zend_API.c
Original file line number Diff line number Diff line change
Expand Up @@ -4384,14 +4384,8 @@ ZEND_API void zend_get_callable_zval_from_fcc(const zend_fcall_info_cache *fcc,

ZEND_API const char *zend_get_module_version(const char *module_name) /* {{{ */
{
zend_string *lname;
size_t name_len = strlen(module_name);
zend_module_entry *module;

lname = zend_string_alloc(name_len, 0);
zend_str_tolower_copy(ZSTR_VAL(lname), module_name, name_len);
module = zend_hash_find_ptr(&module_registry, lname);
zend_string_efree(lname);
zend_module_entry *module = zend_hash_str_find_ptr_lc(&module_registry, module_name, name_len);
return module ? module->version : NULL;
}
/* }}} */
Expand Down
8 changes: 1 addition & 7 deletions sapi/cli/php_cli_server.c
Original file line number Diff line number Diff line change
Expand Up @@ -395,13 +395,7 @@ static void append_essential_headers(smart_str* buffer, php_cli_server_client *c

static const char *get_mime_type(const php_cli_server *server, const char *ext, size_t ext_len) /* {{{ */
{
char *ret;
ALLOCA_FLAG(use_heap)
char *ext_lower = do_alloca(ext_len + 1, use_heap);
zend_str_tolower_copy(ext_lower, ext, ext_len);
ret = zend_hash_str_find_ptr(&server->extension_mime_types, ext_lower, ext_len);
free_alloca(ext_lower, use_heap);
return (const char*)ret;
return zend_hash_str_find_ptr_lc(&server->extension_mime_types, ext, ext_len);
} /* }}} */

PHP_FUNCTION(apache_request_headers) /* {{{ */
Expand Down