diff options
author | Aaron Piotrowski <aaron@trowski.com> | 2016-06-11 12:07:28 -0500 |
---|---|---|
committer | Aaron Piotrowski <aaron@trowski.com> | 2016-06-13 09:02:17 -0500 |
commit | 771e5cc24716304dd2bf8cbd8aec11d465965d0a (patch) | |
tree | cf85742ca6a5810f284f62902f9dc7efc756a663 /ext/mbstring | |
parent | e3c681aa5cc71122a8d2fae42e6513fc413ccac8 (diff) | |
download | php-git-771e5cc24716304dd2bf8cbd8aec11d465965d0a.tar.gz |
Replace zend_ce_error with NULL and replace more E_ERROR with thrown Error
Diffstat (limited to 'ext/mbstring')
-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 14e8da4548..e151a8c537 100644 --- a/ext/mbstring/php_mbregex.c +++ b/ext/mbstring/php_mbregex.c @@ -28,7 +28,6 @@ #if HAVE_MBREGEX -#include "zend_exceptions.h" #include "zend_smart_str.h" #include "ext/standard/info.h" #include "php_mbregex.h" @@ -950,7 +949,10 @@ static void _php_mb_regex_ereg_replace_exec(INTERNAL_FUNCTION_PARAMETERS, OnigOp if (zend_eval_stringl(ZSTR_VAL(eval_str), ZSTR_LEN(eval_str), &v, description) == FAILURE) { efree(description); zend_throw_error(NULL, "Failed evaluating code: %s%s", PHP_EOL, ZSTR_VAL(eval_str)); - /* zend_error() does not return in this case */ + onig_region_free(regs, 0); + smart_str_free(&out_buf); + smart_str_free(&eval_buf); + RETURN_FALSE; } /* result of eval */ |