summaryrefslogtreecommitdiff
path: root/ext/mbstring/php_mbregex.c
diff options
context:
space:
mode:
authorAaron Piotrowski <aaron@trowski.com>2016-07-05 02:08:39 -0500
committerAaron Piotrowski <aaron@trowski.com>2016-07-05 02:08:39 -0500
commit24237027bc7e4f7aed9287fe9815c0577eeb1c22 (patch)
treebc23b05ba89a75f0e0711933371f708b96e63345 /ext/mbstring/php_mbregex.c
parent42666da1714673d537356221e688f57f404fe1d2 (diff)
parente9832b5ab1d986ddd3ea0705bcbc5a391dc16614 (diff)
downloadphp-git-24237027bc7e4f7aed9287fe9815c0577eeb1c22.tar.gz
Merge branch 'throw-error-in-extensions'
Diffstat (limited to 'ext/mbstring/php_mbregex.c')
-rw-r--r--ext/mbstring/php_mbregex.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/ext/mbstring/php_mbregex.c b/ext/mbstring/php_mbregex.c
index 00ae75afaf..5af7eb15c6 100644
--- a/ext/mbstring/php_mbregex.c
+++ b/ext/mbstring/php_mbregex.c
@@ -955,8 +955,11 @@ static void _php_mb_regex_ereg_replace_exec(INTERNAL_FUNCTION_PARAMETERS, OnigOp
/* do eval */
if (zend_eval_stringl(ZSTR_VAL(eval_str), ZSTR_LEN(eval_str), &v, description) == FAILURE) {
efree(description);
- php_error_docref(NULL,E_ERROR, "Failed evaluating code: %s%s", PHP_EOL, ZSTR_VAL(eval_str));
- /* zend_error() does not return in this case */
+ zend_throw_error(NULL, "Failed evaluating code: %s%s", PHP_EOL, ZSTR_VAL(eval_str));
+ onig_region_free(regs, 0);
+ smart_str_free(&out_buf);
+ smart_str_free(&eval_buf);
+ RETURN_FALSE;
}
/* result of eval */