diff options
Diffstat (limited to 'ext/mbstring/php_mbregex.c')
-rw-r--r-- | ext/mbstring/php_mbregex.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ext/mbstring/php_mbregex.c b/ext/mbstring/php_mbregex.c index a9e464fa64..cf341d3599 100644 --- a/ext/mbstring/php_mbregex.c +++ b/ext/mbstring/php_mbregex.c @@ -708,8 +708,10 @@ static void _php_mb_regex_ereg_exec(INTERNAL_FUNCTION_PARAMETERS, int icase) string_len, _php_mb_regex_mbctype2name(MBREX(current_mbctype)) )) { - zval_dtor(array); - array_init(array); + if (array != NULL) { + zval_dtor(array); + array_init(array); + } RETURN_FALSE; } |