mirror of
https://codeberg.org/icewind/SMB.git
synced 2026-06-03 17:24:07 +02:00
psalm fixes
This commit is contained in:
parent
05cc363c9f
commit
4a93467905
12 changed files with 61 additions and 33 deletions
|
|
@ -28,7 +28,7 @@ class TimeZoneProvider implements ITimeZoneProvider {
|
|||
$timeZone = null;
|
||||
$net = $this->system->getNetPath();
|
||||
// for local domain names we can assume same timezone
|
||||
if ($net && $host && strpos($host, '.') !== false) {
|
||||
if ($net !== null && $host && strpos($host, '.') !== false) {
|
||||
$command = sprintf(
|
||||
'%s time zone -S %s',
|
||||
$net,
|
||||
|
|
@ -37,11 +37,12 @@ class TimeZoneProvider implements ITimeZoneProvider {
|
|||
$timeZone = exec($command);
|
||||
}
|
||||
|
||||
if (!$timeZone) {
|
||||
if (!is_string($timeZone)) {
|
||||
$date = $this->system->getDatePath();
|
||||
if ($date) {
|
||||
if ($date !== null) {
|
||||
$timeZone = exec($date . " +%z");
|
||||
} else {
|
||||
}
|
||||
if (!is_string($timeZone)) {
|
||||
$timeZone = date_default_timezone_get();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue