cvs: php-src /main main.c
| From: | Ilia Alshanetsky | Date: | Mon, 18 Sep 2006 23:11:02 +0000 |
| Subject: | cvs: php-src /main main.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-40575@lists.php.net to get a copy of this message | ||
iliaa Mon Sep 18 23:11:02 2006 UTC
Modified files:
/php-src/main main.c
Log:
MFB: Avoid generating php_errormsg twice in some instances.
http://cvs.php.net/viewvc.cgi/php-src/main/main.c?r1=1.700&r2=1.701&diff_format=u
Index: php-src/main/main.c
diff -u php-src/main/main.c:1.700 php-src/main/main.c:1.701
--- php-src/main/main.c:1.700 Thu Aug 17 13:43:51 2006
+++ php-src/main/main.c Mon Sep 18 23:11:01 2006
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: main.c,v 1.700 2006/08/17 13:43:51 iliaa Exp $ */
+/* $Id: main.c,v 1.701 2006/09/18 23:11:01 iliaa Exp $ */
/* {{{ includes
*/
@@ -680,7 +680,8 @@
php_error(type, "%s", message);
efree(message);
- if (PG(track_errors) && module_initialized && EG(active_symbol_table)) {
+ if (PG(track_errors) && module_initialized && EG(active_symbol_table) &&
+ (!EG(user_error_handler) || !(EG(user_error_handler_error_reporting) & type))) {
zval *tmp;
ALLOC_INIT_ZVAL(tmp);
ZVAL_RT_STRINGL(tmp, buffer, buffer_len, 1);
@@ -947,8 +948,7 @@
if (PG(track_errors) && module_initialized && EG(active_symbol_table)) {
zval *tmp;
- ALLOC_ZVAL(tmp);
- INIT_PZVAL(tmp);
+ ALLOC_INIT_ZVAL(tmp);
ZVAL_RT_STRINGL(tmp, buffer, buffer_len, 1);
zend_hash_update(EG(active_symbol_table), "php_errormsg",
sizeof("php_errormsg"), (void **) & tmp, sizeof(zval *), NULL);
}