]> granicus.if.org Git - php/commitdiff
simplify condition
authorAnatol Belski <ab@php.net>
Fri, 19 Sep 2014 13:04:06 +0000 (15:04 +0200)
committerAnatol Belski <ab@php.net>
Fri, 19 Sep 2014 14:30:01 +0000 (16:30 +0200)
ext/mbstring/php_mbregex.c

index 62b3e962f6abd99c448aec3e69ce09b50677e418..36147e972c5f6b7989b27ade92e6465133e46bd6 100644 (file)
@@ -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;