Suppress PHP warning when using date_default_timezone_get()
Thanks to @nem25 for reporting this
This commit is contained in:
parent
b3f1347379
commit
d8be108c5b
|
@ -8,6 +8,7 @@ Released: -
|
||||||
* [Changed] Improve documentation
|
* [Changed] Improve documentation
|
||||||
* [Changed] Replace `version_compare()` with `PHP_VERSION_ID` in
|
* [Changed] Replace `version_compare()` with `PHP_VERSION_ID` in
|
||||||
`index.php.dist` (available since PHP 5.2.7)
|
`index.php.dist` (available since PHP 5.2.7)
|
||||||
|
* [Fixed] Suppress PHP warning when using `date_default_timezone_get()`
|
||||||
```
|
```
|
||||||
|
|
||||||
### Version 1.0.0
|
### Version 1.0.0
|
||||||
|
|
|
@ -498,7 +498,7 @@ class Pico
|
||||||
// explicitly set a default timezone to prevent a E_NOTICE
|
// explicitly set a default timezone to prevent a E_NOTICE
|
||||||
// when no timezone is set; the `date_default_timezone_get()`
|
// when no timezone is set; the `date_default_timezone_get()`
|
||||||
// function always returns a timezone, at least UTC
|
// function always returns a timezone, at least UTC
|
||||||
$this->config['timezone'] = date_default_timezone_get();
|
$this->config['timezone'] = @date_default_timezone_get();
|
||||||
}
|
}
|
||||||
date_default_timezone_set($this->config['timezone']);
|
date_default_timezone_set($this->config['timezone']);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue