Quellcode durchsuchen

Explicitly define for old php versions when it's undefined

pdontthink vor 22 Jahren
Ursprung
Commit
0b5881d78f
1 geänderte Dateien mit 4 neuen und 1 gelöschten Zeilen
  1. 4 1
      functions/global.php

+ 4 - 1
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