Skip to content

Commit

Permalink
Fixed #5057: PHP 5/Mysql 4.0/Apache 2.0 - Index page fails to load
Browse files Browse the repository at this point in the history
git-svn-id: http://mantisbt.svn.sourceforge.net/svnroot/mantisbt/trunk@3257 f5dc347c-c33d-0410-90a0-b07cc1902cb9
  • Loading branch information
vboctor committed Jan 27, 2005
1 parent 4d37680 commit 7fd8643
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions core/error_api.php
Expand Up @@ -6,7 +6,7 @@
# See the README and LICENSE files for details

# --------------------------------------------------------
# $Id: error_api.php,v 1.38 2005-01-11 00:47:55 thraxisp Exp $
# $Id: error_api.php,v 1.39 2005-01-27 11:55:11 vboctor Exp $
# --------------------------------------------------------

### Error API ###
Expand Down Expand Up @@ -40,8 +40,15 @@ function error_handler( $p_type, $p_error, $p_file, $p_line, $p_context ) {
return;
}

$t_lang_pushed = false;

# flush any language overrides to return to user's natural default
lang_push( lang_get_default() );
if ( function_exists( 'db_is_connected' ) ) {
if ( db_is_connected() ) {
lang_push( lang_get_default() );
$t_lang_pushed = true;
}
}

$t_short_file = basename( $p_file );
$t_method_array = config_get( 'display_errors' );
Expand Down Expand Up @@ -135,7 +142,10 @@ function error_handler( $p_type, $p_error, $p_file, $p_line, $p_context ) {
# do nothing
}

lang_pop();
if ( $t_lang_pushed ) {
lang_pop();
}

$g_error_parameters = array();
$g_error_handled = true;
$g_error_proceed_url = null;
Expand Down

0 comments on commit 7fd8643

Please sign in to comment.