MDL-22625 workaround for missing default timezone
This commit is contained in:
@@ -46,6 +46,12 @@ if (file_exists($configfile)) {
|
||||
define('CLI_SCRIPT', false); // prevents some warnings later
|
||||
define('AJAX_SCRIPT', false); // prevents some warnings later
|
||||
|
||||
// Servers should define a default timezone in php.ini, but if they don't then make sure something is defined.
|
||||
// This is a quick hack. Ideally we should ask the admin for a value. See MDL-22625 for more on this.
|
||||
if (function_exists('date_default_timezone_set') and function_exists('date_default_timezone_get')) {
|
||||
@date_default_timezone_set(@date_default_timezone_get());
|
||||
}
|
||||
|
||||
// make sure PHP errors are displayed - helps with diagnosing of problems
|
||||
@error_reporting(E_ALL);
|
||||
@ini_set('display_errors', '1');
|
||||
|
||||
Reference in New Issue
Block a user