From 7cef62621819a7545b778ae75d6180249da63cd2 Mon Sep 17 00:00:00 2001 From: Victor Boctor Date: Sat, 24 Jul 2004 13:26:18 +0000 Subject: [PATCH] Fixed undefined $_SERVER['REQUEST_URI'] error. git-svn-id: http://mantisbt.svn.sourceforge.net/svnroot/mantisbt/trunk@2748 f5dc347c-c33d-0410-90a0-b07cc1902cb9 --- core/access_api.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/core/access_api.php b/core/access_api.php index e3ff1d35e2..1e05440d43 100644 --- a/core/access_api.php +++ b/core/access_api.php @@ -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; @@ -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 '
'; PRINT '

'.error_string(ERROR_ACCESS_DENIED).'

';