diff options
| author | Anatol Belski <ab@php.net> | 2014-09-19 11:23:23 +0200 |
|---|---|---|
| committer | Anatol Belski <ab@php.net> | 2014-09-19 11:23:23 +0200 |
| commit | bf7203e1e02f1313a3fd8beb3bbdb102a77f1388 (patch) | |
| tree | 830fe8dcd4bebd1acfa269579ec3864d311de8e4 /ext | |
| parent | 953386edfd4f0d59c3a8ead1ea90b20e49796ea3 (diff) | |
| download | php-git-bf7203e1e02f1313a3fd8beb3bbdb102a77f1388.tar.gz | |
fix empty string check
Diffstat (limited to 'ext')
| -rw-r--r-- | ext/mbstring/php_mbregex.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/mbstring/php_mbregex.c b/ext/mbstring/php_mbregex.c index 864d50a5ce..62b3e962f6 100644 --- a/ext/mbstring/php_mbregex.c +++ b/ext/mbstring/php_mbregex.c @@ -717,7 +717,7 @@ static void _php_mb_regex_ereg_exec(INTERNAL_FUNCTION_PARAMETERS, int icase) /* don't bother doing an extended regex with just a number */ } - if (!Z_STRVAL_P(arg_pattern) || Z_STRLEN_P(arg_pattern) == 0) { + if (!Z_STRVAL_P(arg_pattern)[0] || Z_STRLEN_P(arg_pattern) == 0) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "empty pattern"); RETVAL_FALSE; goto out; |
