Explicitly define for old php versions when it's undefined
authorpdontthink <pdontthink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Thu, 13 Mar 2003 10:13:17 +0000 (10:13 +0000)
committerpdontthink <pdontthink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Thu, 13 Mar 2003 10:13:17 +0000 (10:13 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@4651 7612ce4b-ef26-0410-bec9-ea0150e637f0

functions/global.php

index 5ee2ca7..2462ac6 100644 (file)
@@ -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