Skip to content

Commit

Permalink
Fixed undefined $_SERVER['REQUEST_URI'] error.
Browse files Browse the repository at this point in the history
git-svn-id: http://mantisbt.svn.sourceforge.net/svnroot/mantisbt/trunk@2748 f5dc347c-c33d-0410-90a0-b07cc1902cb9
  • Loading branch information
vboctor committed Jul 24, 2004
1 parent a1025a7 commit 7cef626
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions core/access_api.php
Expand Up @@ -6,7 +6,7 @@
# See the README and LICENSE files for details

# --------------------------------------------------------
# $Id: access_api.php,v 1.28 2004-04-08 20:52:49 prescience Exp $
# $Id: access_api.php,v 1.29 2004-07-24 13:26:18 vboctor Exp $
# --------------------------------------------------------

$t_core_dir = dirname( __FILE__ ).DIRECTORY_SEPARATOR;
Expand All @@ -30,8 +30,12 @@ function access_denied() {
}

if ( !auth_is_user_authenticated() ) {
$p_return_page = string_url( $_SERVER['REQUEST_URI'] );
print_header_redirect( 'login_page.php?return=' . $p_return_page );
if ( isset( $_SERVER['REQUEST_URI'] ) ) {
$p_return_page = string_url( $_SERVER['REQUEST_URI'] );
print_header_redirect( 'login_page.php?return=' . $p_return_page );
} else {
print_header_redirect( 'login_page.php' );
}
} else {
PRINT '<center>';
PRINT '<p>'.error_string(ERROR_ACCESS_DENIED).'</p>';
Expand Down

0 comments on commit 7cef626

Please sign in to comment.