]> granicus.if.org Git - php/commitdiff
fix #31732 (mb_get_info causes segfault)
authorAntony Dovgal <tony2001@php.net>
Fri, 28 Jan 2005 01:58:26 +0000 (01:58 +0000)
committerAntony Dovgal <tony2001@php.net>
Fri, 28 Jan 2005 01:58:26 +0000 (01:58 +0000)
ext/mbstring/mbstring.c

index d28f17b0a7cf04d6ef4f24bc8d495669b616dbc7..1b0bac429d7d2b75a2f1f287eca501b60f479150 100644 (file)
@@ -3229,7 +3229,7 @@ PHP_FUNCTION(mb_get_info)
                RETURN_FALSE;
        }
 
-       if (!strcasecmp("all", typ)) {
+       if (!typ || !strcasecmp("all", typ)) {
                array_init(return_value);
                if ((name = (char *)mbfl_no_encoding2name(MBSTRG(current_internal_encoding))) != NULL) {
                        add_assoc_string(return_value, "internal_encoding", name, 1);