diff options
author | Bharat Mediratta <bharat@menalto.com> | 2012-05-07 11:38:51 -0700 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2012-05-07 11:38:51 -0700 |
commit | e722e5d5d4fbd8a70cc67c4d545390120ed00608 (patch) | |
tree | 590a511863b7d44eead112a344e77c2f901ff9e7 /modules/gallery/helpers/gallery_event.php | |
parent | 62623a84d0228e3851e7cca99cc84e34d572dce0 (diff) |
Fix missing date.timezone which results in a crash on startup in I18n
code. Fill in missing field and log it 25% of the time. Fixes #1853.
Diffstat (limited to 'modules/gallery/helpers/gallery_event.php')
-rw-r--r-- | modules/gallery/helpers/gallery_event.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/modules/gallery/helpers/gallery_event.php b/modules/gallery/helpers/gallery_event.php index 781775b0..6225633f 100644 --- a/modules/gallery/helpers/gallery_event.php +++ b/modules/gallery/helpers/gallery_event.php @@ -23,6 +23,14 @@ class gallery_event_Core { * Initialization. */ static function gallery_ready() { + if (!get_cfg_var("date.timezone")) { + if (!(rand() % 4)) { + Kohana_Log::add("error", "date.timezone setting not detected in " . + get_cfg_var("cfg_file_path") . " falling back to UTC. " . + "Consult http://php.net/manual/function.get-cfg-var.php for help."); + } + } + identity::load_user(); theme::load_themes(); locales::set_request_locale(); |