summaryrefslogtreecommitdiff
path: root/Zend/zend.c
diff options
context:
space:
mode:
authorDerick Rethans <github@derickrethans.nl>2012-10-04 08:39:34 +0100
committerDerick Rethans <github@derickrethans.nl>2012-10-04 08:39:34 +0100
commitb004a04f0aaf041e5fabaf788eee3e9ee0f3afaf (patch)
treef3b3dd22329eb6f2b258145a92722becb9ee6b8d /Zend/zend.c
parent78354f30d99ebc7f1035c567b9b00e967d87ecc8 (diff)
parent64c09f68ec66061d1085ad5a5ef0a5ced63450b6 (diff)
downloadphp-git-b004a04f0aaf041e5fabaf788eee3e9ee0f3afaf.tar.gz
Merge branch 'PHP-5.3' of git.php.net:/php-src into PHP-5.3
Diffstat (limited to 'Zend/zend.c')
-rw-r--r--Zend/zend.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/Zend/zend.c b/Zend/zend.c
index ea32346dae..bd53d55183 100644
--- a/Zend/zend.c
+++ b/Zend/zend.c
@@ -997,6 +997,29 @@ ZEND_API void zend_error(int type, const char *format, ...) /* {{{ */
zend_stack labels_stack;
TSRMLS_FETCH();
+ /* Report about uncaught exception in case of fatal errors */
+ if (EG(exception)) {
+ switch (type) {
+ case E_CORE_ERROR:
+ case E_ERROR:
+ case E_RECOVERABLE_ERROR:
+ case E_PARSE:
+ case E_COMPILE_ERROR:
+ case E_USER_ERROR:
+ if (zend_is_executing(TSRMLS_C)) {
+ error_lineno = zend_get_executed_lineno(TSRMLS_C);
+ }
+ zend_exception_error(EG(exception), E_WARNING TSRMLS_CC);
+ EG(exception) = NULL;
+ if (zend_is_executing(TSRMLS_C) && EG(opline_ptr)) {
+ active_opline->lineno = error_lineno;
+ }
+ break;
+ default:
+ break;
+ }
+ }
+
/* Obtain relevant filename and lineno */
switch (type) {
case E_CORE_ERROR: