mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-21 01:25:55 +02:00
Added declare strict types to all files
This commit is contained in:
parent
bea90a7d94
commit
6a2ff9d153
196 changed files with 685 additions and 360 deletions
|
@ -43,12 +43,12 @@ final class SetUserTimezoneSubscriber implements EventSubscriberInterface
|
|||
|
||||
//Check if the user has set a timezone
|
||||
$user = $this->security->getUser();
|
||||
if ($user instanceof User && !empty($user->getTimezone())) {
|
||||
if ($user instanceof User && ($user->getTimezone() !== null && $user->getTimezone() !== '')) {
|
||||
$timezone = $user->getTimezone();
|
||||
}
|
||||
|
||||
//Fill with default value if needed
|
||||
if (null === $timezone && !empty($this->default_timezone)) {
|
||||
if (null === $timezone && $this->default_timezone !== '') {
|
||||
$timezone = $this->default_timezone;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue