View Issue Details

IDProjectCategoryView StatusLast Update
0008883mantisbtotherpublic2016-07-20 17:13
Reporterpardini Assigned Tograngeway  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version1.1.1 
Fixed in Version1.2.0a3 
Summary0008883: error_api.php: error_handled() returns true after an 'ignored' error, like a E_NOTICE
Description

The default config says that E_NOTICE should be ignored (eg 'none').

Even so, when some E_NOTICE is raised the error handler does set $g_error_handled to true, which causes error_handled() to return true.

That causes, for example, print_header_redirect() (in print_api.php) to do nothing, resulting a "white screen of death".

Possible solution is to not set $g_error_handled to true if $t_method is 'none'.

Steps To Reproduce

1) Using default configuration
2) Make some change to, for example, bug_update.php so that it causes a E_NOTICE.
3) Hit it and watch it whitescreen

Tagspatch
Attached Files
error_api.php.patch (643 bytes)   
Index: error_api.php
===================================================================
RCS file: /var/lib/cvs/mantis/core/error_api.php,v
retrieving revision 1.3
diff -u -r1.3 error_api.php
--- error_api.php	10 Feb 2008 00:49:02 -0000	1.3
+++ error_api.php	12 Feb 2008 16:48:52 -0000
@@ -171,10 +171,12 @@
 		if ( $t_lang_pushed ) {
 			lang_pop();
 		}
-
-		$g_error_parameters = array();
-		$g_error_handled = true;
-		$g_error_proceed_url = null;
+		
+		if (!($t_method == 'none')) {
+			$g_error_parameters = array();
+			$g_error_handled = true;
+			$g_error_proceed_url = null;
+		}
 	}
 
 	# ---------------

error_api.php.patch (643 bytes)   

Activities

pardini

pardini

2008-02-12 11:52

reporter   ~0017029

Attached patch is a actually a simple hack which solves the problem.