diff --git a/includes/bootstrap.inc b/includes/bootstrap.inc
index d0deec60844fb6f9babbca5459524a9bf4bb9f72..fe36c53b6a424534481ca18ce544421f0288046a 100644
--- a/includes/bootstrap.inc
+++ b/includes/bootstrap.inc
@@ -140,7 +140,7 @@ function conf_path() {
 function drupal_unset_globals() {
   if (ini_get('register_globals')) {
     $allowed = array('_ENV' => 1, '_GET' => 1, '_POST' => 1, '_COOKIE' => 1, '_FILES' => 1, '_SERVER' => 1, '_REQUEST' => 1, 'access_check' => 1, 'GLOBALS' => 1);
-    foreach ($GLOBALS as $key) {
+    foreach ($GLOBALS as $key => $value) {
       if (!isset($allowed[$key])) {
         unset($GLOBALS[$key]);
       }