From cc4072575deee160085a9a2abbeee14a8d03998a Mon Sep 17 00:00:00 2001 From: pdontthink Date: Thu, 13 Mar 2003 10:13:17 +0000 Subject: [PATCH] Explicitly define for old php versions when it's undefined git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@4651 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/global.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/functions/global.php b/functions/global.php index 5ee2ca7e..2462ac6d 100644 --- a/functions/global.php +++ b/functions/global.php @@ -38,7 +38,7 @@ ini_set('magic_quotes_runtime','0'); if ( !check_php_version(4,1) ) { global $_COOKIE, $_ENV, $_FILES, $_GET, $_POST, $_SERVER, $_SESSION; global $HTTP_COOKIE_VARS, $HTTP_ENV_VARS, $HTTP_POST_FILES, $HTTP_GET_VARS, - $HTTP_POST_VARS, $HTTP_SERVER_VARS, $HTTP_SESSION_VARS; + $HTTP_POST_VARS, $HTTP_SERVER_VARS, $HTTP_SESSION_VARS, $PHP_SELF; $_COOKIE =& $HTTP_COOKIE_VARS; $_ENV =& $HTTP_ENV_VARS; $_FILES =& $HTTP_POST_FILES; @@ -46,6 +46,9 @@ if ( !check_php_version(4,1) ) { $_POST =& $HTTP_POST_VARS; $_SERVER =& $HTTP_SERVER_VARS; $_SESSION =& $HTTP_SESSION_VARS; + if (!isset($PHP_SELF) || empty($PHP_SELF)) { + $PHP_SELF = $HTTP_SERVER_VARS['PHP_SELF']; + } } /* if running with magic_quotes_gpc then strip the slashes -- 2.25.1