Skip to content

Commit

Permalink
fix(caldav): test for null and blank value
Browse files Browse the repository at this point in the history
Signed-off-by: SebastianKrupinski <krupinskis05@gmail.com>
  • Loading branch information
SebastianKrupinski committed Jul 19, 2024
1 parent 22efc6d commit 2d9bead
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/dav/lib/CalDAV/Reminder/ReminderService.php
Original file line number Diff line number Diff line change
Expand Up @@ -847,7 +847,7 @@ private function isRecurring(VEvent $vevent):bool {
private function getCalendarTimeZone(int $calendarid): DateTimeZone {
$calendarInfo = $this->caldavBackend->getCalendarById($calendarid);
$tzProp = '{urn:ietf:params:xml:ns:caldav}calendar-timezone';
if (!isset($calendarInfo[$tzProp])) {
if (empty($calendarInfo[$tzProp])) {

Check notice

Code scanning / Psalm

RiskyTruthyFalsyComparison Note

Operand of type null|string contains type string, which can be falsy and truthy. This can cause possibly unexpected behavior. Use strict comparison instead.
// Defaulting to UTC
return new DateTimeZone('UTC');
}
Expand Down

0 comments on commit 2d9bead

Please sign in to comment.