summaryrefslogtreecommitdiff
path: root/ext/mbstring/php_mbregex.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/mbstring/php_mbregex.c')
-rw-r--r--ext/mbstring/php_mbregex.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/mbstring/php_mbregex.c b/ext/mbstring/php_mbregex.c
index 83cd25d89d..9fac8233ba 100644
--- a/ext/mbstring/php_mbregex.c
+++ b/ext/mbstring/php_mbregex.c
@@ -924,7 +924,9 @@ static void _php_mb_regex_ereg_exec(INTERNAL_FUNCTION_PARAMETERS, int icase)
if (Z_TYPE_P(arg_pattern) == IS_DOUBLE) {
convert_to_long_ex(arg_pattern); /* get rid of decimal places */
}
- convert_to_string_ex(arg_pattern);
+ if (!try_convert_to_string(arg_pattern)) {
+ return;
+ }
/* don't bother doing an extended regex with just a number */
}