From b65f1dae41557346ee250342e248f3dd5f68c4e9 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Mon, 5 Jul 2010 12:03:08 +0000 Subject: Reduced overhead of ext/mbstring initialization --- ext/mbstring/php_mbregex.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext/mbstring/php_mbregex.c') diff --git a/ext/mbstring/php_mbregex.c b/ext/mbstring/php_mbregex.c index 74991051f0..c0b48e74d9 100644 --- a/ext/mbstring/php_mbregex.c +++ b/ext/mbstring/php_mbregex.c @@ -372,7 +372,7 @@ static OnigEncoding _php_mb_regex_name2mbctype(const char *pname) const char *p; php_mb_regex_enc_name_map_t *mapping; - if (pname == NULL) { + if (pname == NULL || !*pname) { return ONIG_ENCODING_UNDEF; } -- cgit v1.2.1