summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott MacVicar <scottmac@php.net>2011-01-27 11:47:31 +0000
committerScott MacVicar <scottmac@php.net>2011-01-27 11:47:31 +0000
commitc10b7e3ac2825d6bb41a47290a4118212dc7b1db (patch)
tree9d32e0516eb993ffe16584c80e456892aac6693a
parent36854c3cadba043e71bc4aa1c6844e5d2d50e979 (diff)
downloadphp-git-c10b7e3ac2825d6bb41a47290a4118212dc7b1db.tar.gz
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.
-rw-r--r--ext/mbstring/mbstring.c2
1 files changed, 1 insertions, 1 deletions
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;
}
}