diff --git a/ext/mbstring/php_mbregex.c b/ext/mbstring/php_mbregex.c index e1a5a10c39938..08db861f564ec 100644 --- a/ext/mbstring/php_mbregex.c +++ b/ext/mbstring/php_mbregex.c @@ -1106,12 +1106,6 @@ static void _php_mb_regex_ereg_replace_exec(INTERNAL_FUNCTION_PARAMETERS, OnigOp smart_str_appendl(&out_buf, Z_STRVAL(retval), Z_STRLEN(retval)); smart_str_free(&eval_buf); zval_ptr_dtor(&retval); - } else { - if (!EG(exception)) { - zend_throw_error(NULL, "Unable to call custom replacement function"); - zval_ptr_dtor(&subpats); - RETURN_THROWS(); - } } zval_ptr_dtor(&subpats); }