mirror of
https://github.com/e107inc/e107.git
synced 2025-08-05 14:17:49 +02:00
Bugtracker #5202 - trap errors if timezone not set (it should be) on PHP >=5.3
This commit is contained in:
@@ -37,6 +37,15 @@ $pageUnique = array('page' => 1, 'content' => array('content'));
|
|||||||
$logVals = urldecode(base64_decode($_GET['lv']));
|
$logVals = urldecode(base64_decode($_GET['lv']));
|
||||||
parse_str($logVals, $vals);
|
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('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
|
header('Expires: Sat, 26 Jul 1997 05:00:00 GMT'); // Date in the past
|
||||||
|
Reference in New Issue
Block a user