Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
  • Loading branch information
tobiasKaminsky committed Jul 12, 2024
1 parent 1a5c02c commit 6d54e4a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/dav/lib/Search/EventsSearchProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ public function search(
$result = new SearchResultEntry('', $title, $subline, $resourceUrl, 'icon-calendar-dark', false);

$dtStart = $component->DTSTART;
$startDateTime = new \DateTime($dtStart->getDateTime()->format('U'));
$startDateTime = $dtStart->getDateTime()->format('U');

Check notice

Code scanning / Psalm

PossiblyNullReference Note

Cannot call method getDateTime on possibly null value

Check notice

Code scanning / Psalm

UndefinedMethod Note

Method Sabre\VObject\Property::getDateTime does not exist
$result->addAttribute("createdAt", $this->l10n->l('date', $startDateTime));

Check failure

Code scanning / Psalm

InvalidScalarArgument Error

Argument 2 of OCP\Search\SearchResultEntry::addAttribute expects string, but false|int|string provided

Check failure on line 164 in apps/dav/lib/Search/EventsSearchProvider.php

View workflow job for this annotation

GitHub Actions / static-code-analysis

InvalidScalarArgument

apps/dav/lib/Search/EventsSearchProvider.php:164:39: InvalidScalarArgument: Argument 2 of OCP\Search\SearchResultEntry::addAttribute expects string, but false|int|string provided (see https://psalm.dev/012)

return $result;
Expand Down

0 comments on commit 6d54e4a

Please sign in to comment.