]> granicus.if.org Git - php/commitdiff
Fix crash with mbstring, this probably isn't the correct behaviour but 272/276 of...
authorScott MacVicar <scottmac@php.net>
Thu, 27 Jan 2011 11:47:31 +0000 (11:47 +0000)
committerScott MacVicar <scottmac@php.net>
Thu, 27 Jan 2011 11:47:31 +0000 (11:47 +0000)
When mbstring.language is unset, it ends up being mbfl_no_language_neutral and there is no default when setting the encoding.

internal_encoding and current_internal_encoding then end up being null.

ext/mbstring/mbstring.c

index c6fec32e52921f511c8f782844a71a7de0d2944b..a006843e0865d9b616773fe261c9a76e77afa877 100644 (file)
@@ -1252,7 +1252,7 @@ int _php_mb_ini_mbstring_internal_encoding_set(const char *new_value, uint new_v
                                encoding = mbfl_no2encoding(mbfl_no_encoding_8859_9);
                                break;
                        default:
-                               encoding = NULL;
+                               encoding = mbfl_no2encoding(mbfl_no_encoding_8859_1);
                                break;
                }
        }