cvs: /php4/ext/standard assert.c /php4/ext/pcre php_pcre.c

From: Date: Sat, 06 May 2000 17:57:34 +0000
Subject: cvs: /php4/ext/standard assert.c /php4/ext/pcre php_pcre.c
Groups: php.version4 
Request: Send a blank email to php-version4+get-14596@lists.php.net to get a copy of this message
andrei Sat May 6 10:57:34 2000 EDT Modified files: /php4/ext/standard assert.c /php4/ext/pcre php_pcre.c Log: Fixes for possible failure of zend_eval_string(). Index: php4/ext/standard/assert.c diff -u php4/ext/standard/assert.c:1.18 php4/ext/standard/assert.c:1.19 --- php4/ext/standard/assert.c:1.18 Wed May 3 07:24:14 2000 +++ php4/ext/standard/assert.c Sat May 6 10:57:34 2000 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: assert.c,v 1.18 2000/05/03 14:24:14 andrei Exp $ */ +/* $Id: assert.c,v 1.19 2000/05/06 17:57:34 andrei Exp $ */ /* {{{ includes/startup/misc */ @@ -160,7 +160,10 @@ EG(error_reporting) = 0; } - zend_eval_string(myeval, &retval CLS_CC ELS_CC); + if (zend_eval_string(myeval, &retval CLS_CC ELS_CC) == FAILURE) { + zend_error(E_ERROR, "Failure evaluating code:\n%s\n", myeval); + /* zend_error() does not return in this case. */ + } if (ASSERT(quiet_eval)) { EG(error_reporting) = old_error_reporting; Index: php4/ext/pcre/php_pcre.c diff -u php4/ext/pcre/php_pcre.c:1.50 php4/ext/pcre/php_pcre.c:1.51 --- php4/ext/pcre/php_pcre.c:1.50 Mon May 1 17:44:25 2000 +++ php4/ext/pcre/php_pcre.c Sat May 6 10:57:34 2000 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_pcre.c,v 1.50 2000/05/02 00:44:25 sas Exp $ */ +/* $Id: php_pcre.c,v 1.51 2000/05/06 17:57:34 andrei Exp $ */ /* TODO: @@ -585,7 +585,10 @@ } /* 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 */

« previous php.version4 (#14596) next »