From c10b7e3ac2825d6bb41a47290a4118212dc7b1db Mon Sep 17 00:00:00 2001 From: Scott MacVicar Date: Thu, 27 Jan 2011 11:47:31 +0000 Subject: [PATCH] Fix crash with mbstring, this probably isn't the correct behaviour but 272/276 of the tests pass after this. 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c index c6fec32e52..a006843e08 100644 --- a/ext/mbstring/mbstring.c +++ b/ext/mbstring/mbstring.c @@ -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; } } -- 2.40.0