From 1364b0322cbcd49c4818bc07eb4f5158cca10172 Mon Sep 17 00:00:00 2001 From: catch Date: Fri, 22 Feb 2013 12:47:01 +0000 Subject: [PATCH] Issue #1892728 by mvc: Fixed PoHeader::__construct() throws warning and breaks localized installs. --- core/lib/Drupal/Component/Gettext/PoHeader.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/lib/Drupal/Component/Gettext/PoHeader.php b/core/lib/Drupal/Component/Gettext/PoHeader.php index ae68abcd804..44959eb971b 100644 --- a/core/lib/Drupal/Component/Gettext/PoHeader.php +++ b/core/lib/Drupal/Component/Gettext/PoHeader.php @@ -77,7 +77,9 @@ class PoHeader { */ public function __construct($langcode = NULL) { $this->_langcode = $langcode; - $this->_po_date = date("Y-m-d H:iO"); + // Ignore errors when run during site installation before + // date_default_timezone_set() is called. + $this->_po_date = @date("Y-m-d H:iO"); $this->_pluralForms = 'nplurals=2; plural=(n > 1);'; }