From: Paul R. <pri...@us...> - 2007-07-11 22:21:38
|
Update of /cvsroot/mantisbt/mantisbt/core In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv11626/core Modified Files: error_api.php Log Message: Fix: Error handler when called with a DB_QUERY_FAILED type of error should not attempt to make additional Database queries Call Stack # Time Memory Function Location 1 0.0161 86936 {main}( ) ..(null):0 2 0.2951 10640712 file_add( ) ..(null):45 3 0.3240 13728480 db_query_bound( ) ..(null):669 4 0.3659 13731088 trigger_error ( ) ..(null):220 5 0.3659 13731088 error_handler( ) ..(null):0 6 0.3782 13739008 html_page_top2( ) ..(null):109 7 0.3857 13739328 html_login_info( ) ..(null):119 8 0.4003 13742400 print_project_option_list( ) ..(null):362 9 0.4003 13743176 project_cache_all( ) ..(null):372 10 0.4009 13743776 db_query( ) ..(null):83 11 0.4019 13744384 trigger_error ( ) ..(null):163 Index: error_api.php =================================================================== RCS file: /cvsroot/mantisbt/mantisbt/core/error_api.php,v retrieving revision 1.50 retrieving revision 1.51 diff -u -d -r1.50 -r1.51 --- error_api.php 3 Mar 2007 15:00:43 -0000 1.50 +++ error_api.php 11 Jul 2007 22:21:32 -0000 1.51 @@ -104,9 +104,13 @@ } # don't send the page header information if it has already been sent - if ( $g_error_send_page_header ) { + if ( $g_error_send_page_header ) { html_page_top1(); - html_page_top2(); + if ( $p_error != ERROR_DB_QUERY_FAILED ) { + html_page_top2(); + } else { + html_page_top2a(); + } } PRINT '<br /><div align="center"><table class="width50" cellspacing="1">'; @@ -139,7 +143,12 @@ PRINT '</div>'; } - html_page_bottom1(); + if ( $p_error != ERROR_DB_QUERY_FAILED ) { + html_page_bottom1(); + } else { + html_body_end(); + html_end(); + } exit(); } else if ( 'inline' == $t_method ) { PRINT "<p style=\"color:red\">$t_error_type: $t_error_description</p>"; |