summaryrefslogtreecommitdiff
path: root/kohana/libraries/Input.php
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2009-01-11 22:32:36 +0000
committerBharat Mediratta <bharat@menalto.com>2009-01-11 22:32:36 +0000
commit39835a50277965f77322d5af30123100d2e1b694 (patch)
tree7ece3ce578d3d46ad8ff0176101f266b121c1115 /kohana/libraries/Input.php
parentb98f498ed652f10ffc6dbdd1f7305ff9ec262f74 (diff)
Update Kohana to r3890
Diffstat (limited to 'kohana/libraries/Input.php')
-rw-r--r--kohana/libraries/Input.php13
1 files changed, 5 insertions, 8 deletions
diff --git a/kohana/libraries/Input.php b/kohana/libraries/Input.php
index a0004621..3cdef0b8 100644
--- a/kohana/libraries/Input.php
+++ b/kohana/libraries/Input.php
@@ -83,16 +83,13 @@ class Input_Core {
$preserve = array('GLOBALS', '_REQUEST', '_GET', '_POST', '_FILES', '_COOKIE', '_SERVER', '_ENV', '_SESSION');
// This loop has the same effect as disabling register_globals
- foreach ($GLOBALS as $key => $val)
+ foreach (array_diff(array_keys($GLOBALS), $preserve) as $key)
{
- if ( ! in_array($key, $preserve))
- {
- global $$key;
- $$key = NULL;
+ global $$key;
+ $$key = NULL;
- // Unset the global variable
- unset($GLOBALS[$key], $$key);
- }
+ // Unset the global variable
+ unset($GLOBALS[$key], $$key);
}
// Warn the developer about register globals