Correct login issues with PHP < 4.1
authorebullient <ebullient@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 23 Apr 2003 18:13:08 +0000 (18:13 +0000)
committerebullient <ebullient@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 23 Apr 2003 18:13:08 +0000 (18:13 +0000)
Correctly retrieve values from global vars in case where
4.1 superglobals are not defined..
(Problem caused by references made in global scope not existing within
function scope).

git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@4796 7612ce4b-ef26-0410-bec9-ea0150e637f0

functions/global.php

index 2462ac6d202bd41ef84787165b9541dfbef0edcf..e01cbb6c4a8585756e184421de0a7974985c0289 100644 (file)
@@ -188,8 +188,16 @@ define('SQ_SERVER',5);
  * Returns TRUE if it is.
  */
 function sqgetGlobalVar($name, &$value, $search = SQ_INORDER) {
+
     if ( !check_php_version(4,1) ) {
-        global $_SESSION, $_GET, $_POST, $_COOKIE, $_SERVER;
+        global $HTTP_COOKIE_VARS, $HTTP_GET_VARS, $HTTP_POST_VARS, 
+               $HTTP_SERVER_VARS, $HTTP_SESSION_VARS;
+
+        $_COOKIE  =& $HTTP_COOKIE_VARS;
+        $_GET     =& $HTTP_GET_VARS;
+        $_POST    =& $HTTP_POST_VARS;
+        $_SERVER  =& $HTTP_SERVER_VARS;
+        $_SESSION =& $HTTP_SESSION_VARS;
     }
 
     /* NOTE: DO NOT enclose the constants in the switch