From d732bf85d9e6de9a1626c8849729fd71378c6c1b Mon Sep 17 00:00:00 2001 From: webchick Date: Wed, 6 Jul 2011 13:57:01 -0700 Subject: Issue #1209470 by Damien Tournoud: Fixed REQUEST_TIME is a float with microseconds on PHP 5.4. --- includes/bootstrap.inc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'includes') diff --git a/includes/bootstrap.inc b/includes/bootstrap.inc index 02af930dd..603431176 100644 --- a/includes/bootstrap.inc +++ b/includes/bootstrap.inc @@ -192,8 +192,11 @@ define('LANGUAGE_RTL', 1); /** * For convenience, define a short form of the request time global. + * + * REQUEST_TIME is a float with microseconds since PHP 5.4.0, but float + * timestamps confuses most of the PHP functions (including date_create()). */ -define('REQUEST_TIME', $_SERVER['REQUEST_TIME']); +define('REQUEST_TIME', (int) $_SERVER['REQUEST_TIME']); /** * Flag for drupal_set_title(); text is not sanitized, so run check_plain(). -- cgit v1.2.3