summaryrefslogtreecommitdiff
path: root/ext/mbstring/php_mbregex.c
diff options
context:
space:
mode:
authorAaron Piotrowski <aaron@trowski.com>2015-07-05 02:37:49 -0500
committerAaron Piotrowski <aaron@trowski.com>2015-07-05 12:16:57 -0500
commit907476f34c0dbe34e311c4a99cc07eb40fd2954b (patch)
tree58c26abe27284c5c221182161cb89fdc90cadc1e /ext/mbstring/php_mbregex.c
parent550bbf8f4614a5c868010195f562be3e9ee6bb00 (diff)
downloadphp-git-907476f34c0dbe34e311c4a99cc07eb40fd2954b.tar.gz
Convert E_ERROR to thrown Error in extensions
Diffstat (limited to 'ext/mbstring/php_mbregex.c')
-rw-r--r--ext/mbstring/php_mbregex.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/ext/mbstring/php_mbregex.c b/ext/mbstring/php_mbregex.c
index 88f8772d34..8f548fad4c 100644
--- a/ext/mbstring/php_mbregex.c
+++ b/ext/mbstring/php_mbregex.c
@@ -28,6 +28,7 @@
#if HAVE_MBREGEX
+#include "zend_exceptions.h"
#include "zend_smart_str.h"
#include "ext/standard/info.h"
#include "php_mbregex.h"
@@ -943,8 +944,9 @@ static void _php_mb_regex_ereg_replace_exec(INTERNAL_FUNCTION_PARAMETERS, OnigOp
/* do eval */
if (zend_eval_stringl(ZSTR_VAL(eval_buf.s), ZSTR_LEN(eval_buf.s), &v, description) == FAILURE) {
efree(description);
- php_error_docref(NULL,E_ERROR, "Failed evaluating code: %s%s", PHP_EOL, ZSTR_VAL(eval_buf.s));
- /* zend_error() does not return in this case */
+ zend_throw_error(zend_ce_error, "Failed evaluating code: %s%s", PHP_EOL, ZSTR_VAL(eval_buf.s));
+ onig_region_free(regs, 0);
+ RETVAL_EMPTY_STRING();
}
/* result of eval */