From 0060f95699012292196747d40ef6e7c670b10fa7 Mon Sep 17 00:00:00 2001 From: Andrei Zmievski Date: Sat, 6 May 2000 17:57:34 +0000 Subject: Fixes for possible failure of zend_eval_string(). --- ext/pcre/php_pcre.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'ext/pcre/php_pcre.c') diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c index 09f1641047..fa94b3e09f 100644 --- a/ext/pcre/php_pcre.c +++ b/ext/pcre/php_pcre.c @@ -585,7 +585,10 @@ static int _preg_do_eval(char *eval_str, char *subject, int *offsets, } /* Run the code */ - zend_eval_string(code, &retval CLS_CC ELS_CC); + if (zend_eval_string(code, &retval CLS_CC ELS_CC) == FAILURE) { + zend_error(E_ERROR, "Failed evaluating code:\n%s\n", code); + /* zend_error() does not return in this case */ + } convert_to_string(&retval); /* Save the return value and its length */ -- cgit v1.2.1