Skip to content

Commit a718110

Browse files
committed
ext/standard: Use zend_string in ini_get_all()
1 parent a1cb516 commit a718110

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

ext/standard/basic_functions.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1921,8 +1921,8 @@ PHP_FUNCTION(ini_get)
19211921
/* {{{ Get all configuration options */
19221922
PHP_FUNCTION(ini_get_all)
19231923
{
1924-
char *extname = NULL;
1925-
size_t extname_len = 0, module_number = 0;
1924+
zend_string *extname = NULL;
1925+
size_t module_number = 0;
19261926
zend_module_entry *module;
19271927
bool details = 1;
19281928
zend_string *key;
@@ -1931,15 +1931,15 @@ PHP_FUNCTION(ini_get_all)
19311931

19321932
ZEND_PARSE_PARAMETERS_START(0, 2)
19331933
Z_PARAM_OPTIONAL
1934-
Z_PARAM_STRING_OR_NULL(extname, extname_len)
1934+
Z_PARAM_STR_OR_NULL(extname)
19351935
Z_PARAM_BOOL(details)
19361936
ZEND_PARSE_PARAMETERS_END();
19371937

19381938
zend_ini_sort_entries();
19391939

19401940
if (extname) {
1941-
if ((module = zend_hash_str_find_ptr(&module_registry, extname, extname_len)) == NULL) {
1942-
php_error_docref(NULL, E_WARNING, "Extension \"%s\" cannot be found", extname);
1941+
if ((module = zend_hash_find_ptr(&module_registry, extname)) == NULL) {
1942+
php_error_docref(NULL, E_WARNING, "Extension \"%s\" cannot be found", ZSTR_VAL(extname));
19431943
RETURN_FALSE;
19441944
}
19451945
module_number = module->module_number;

0 commit comments

Comments
 (0)