summaryrefslogtreecommitdiff
path: root/ext/mbstring/php_mbregex.c
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2014-09-19 15:04:06 +0200
committerAnatol Belski <ab@php.net>2014-09-19 16:30:01 +0200
commit469c9bdb392ab0d8c91d7e2ab5ff93c650489143 (patch)
treea43a8f9ee20db17bab6154646e88e8ac2517617f /ext/mbstring/php_mbregex.c
parentbccc653185d2fe8aa6ff83cf84db56a396c6bc05 (diff)
downloadphp-git-469c9bdb392ab0d8c91d7e2ab5ff93c650489143.tar.gz
simplify condition
Diffstat (limited to 'ext/mbstring/php_mbregex.c')
-rw-r--r--ext/mbstring/php_mbregex.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/mbstring/php_mbregex.c b/ext/mbstring/php_mbregex.c
index 62b3e962f6..36147e972c 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)[0] || Z_STRLEN_P(arg_pattern) == 0) {
+ if (Z_STRLEN_P(arg_pattern) == 0) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "empty pattern");
RETVAL_FALSE;
goto out;