OSDN Git Service

Remove $_COOKIE from $_REQUEST
authorkmorimatsu <kmorimatsu@1ca29b6e-896d-4ea0-84a5-967f57386b96>
Tue, 30 Oct 2007 19:01:33 +0000 (19:01 +0000)
committerkmorimatsu <kmorimatsu@1ca29b6e-896d-4ea0-84a5-967f57386b96>
Tue, 30 Oct 2007 19:01:33 +0000 (19:01 +0000)
git-svn-id: https://svn.sourceforge.jp/svnroot/nucleus-jp/nucleus-jp/branches/branch-3-3@348 1ca29b6e-896d-4ea0-84a5-967f57386b96

utf8/nucleus/libs/vars4.1.0.php

index a0b6587..eaf8d8c 100755 (executable)
 /**
  * @license http://nucleuscms.org/license.txt GNU General Public License
  * @copyright Copyright (C) 2002-2007 The Nucleus Group
- * @version $Id: vars4.1.0.php,v 1.10.2.1 2007-09-05 07:46:30 kimitake Exp $
- * @version $NucleusJP: vars4.1.0.php,v 1.10 2007/02/04 06:28:46 kimitake Exp $
+ * @version $Id: vars4.1.0.php,v 1.10.2.2 2007-10-30 19:01:33 kmorimatsu Exp $
+ * @version $NucleusJP: vars4.1.0.php,v 1.10.2.1 2007/09/05 07:46:30 kimitake Exp $
  */
 
+
+// Remove $_COOKIE keys in $_REQUEST
+// This is for maintaining the compatibility with PHP 4.0.6
+// and also for avoiding bugs of plugins due to cookie keys
+if (isset($_REQUEST) and isset($_COOKIE)) {
+       foreach($_COOKIE as $key=>$value) {
+               if (isset($_REQUEST[$key])) unset($_REQUEST[$key]);
+       }
+}
+
 function getVar($name) {
        if (!isset($_GET[$name])) {
                return;