Index: includes/bootstrap.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/bootstrap.inc,v
retrieving revision 1.221
diff -u -p -r1.221 bootstrap.inc
--- includes/bootstrap.inc	6 Sep 2008 08:36:19 -0000	1.221
+++ includes/bootstrap.inc	6 Sep 2008 00:27:44 -0000
@@ -313,6 +313,10 @@ function drupal_unset_globals() {
       }
     }
   }
+  // Make sure that the $_SERVER variable has everything we need.
+  if (!isset($_SERVER['HTTP_REFERER'])) {
+    $_SERVER['HTTP_REFERER'] = '';
+  }
 }
 
 /**
Index: modules/simpletest/tests/session.test
===================================================================
RCS file: /cvs/drupal/drupal/modules/simpletest/tests/session.test,v
retrieving revision 1.2
diff -u -p -r1.2 session.test
--- modules/simpletest/tests/session.test	6 Sep 2008 08:36:21 -0000	1.2
+++ modules/simpletest/tests/session.test	6 Sep 2008 00:21:55 -0000
@@ -113,7 +113,7 @@ class SessionTestCase extends DrupalWebT
     $this->assertEqual($authenticated, $this->session_count_authenticated, t('Correctly counted @count authenticated sessions.', array('@count' => $authenticated)), t('Session'));
 
     // Should return 0 sessions from 1 second from now.
-    $this->assertEqual(sess_count($_SERVER['REQUEST_TIME'] + 1), 0, t('Correctly returned 0 sessions newer than the current time.'), t('Session'));
+    $this->assertEqual(sess_count(time() + 1), 0, t('Correctly returned 0 sessions newer than the current time.'), t('Session'));
 
   }
 
