mirror of
https://github.com/e107inc/e107.git
synced 2025-04-14 01:22:13 +02:00
Bugtracker #5202 - trap errors if timezone not set (it should be) on PHP >=5.3
This commit is contained in:
parent
a069b0c541
commit
868696d0e9
@ -37,6 +37,15 @@ $pageUnique = array('page' => 1, 'content' => array('content'));
|
||||
$logVals = urldecode(base64_decode($_GET['lv']));
|
||||
parse_str($logVals, $vals);
|
||||
|
||||
// We MUST have a timezone set in PHP >= 5.3. This should work for PHP >= 5.1:
|
||||
// @todo may be able to remove this check once minimum PHP version finalised
|
||||
if (function_exists('date_default_timezone_get'))
|
||||
{
|
||||
// Just set a default - it should default to UTC if no timezone set
|
||||
date_default_timezone_set(@date_default_timezone_get());
|
||||
}
|
||||
|
||||
|
||||
|
||||
header('Cache-Control: no-cache, must-revalidate'); // See if this discourages browser caching
|
||||
header('Expires: Sat, 26 Jul 1997 05:00:00 GMT'); // Date in the past
|
||||
|
Loading…
x
Reference in New Issue
Block a user