Skip to content

Commit

Permalink
[stable28] fix(UpdateNotifications): Handle numeric user ids
Browse files Browse the repository at this point in the history
manual backport of #44093 to fix #44051 for <=v28

Signed-off-by: Josh <[email protected]>
  • Loading branch information
joshtrichards authored and backportbot[bot] committed Mar 8, 2024
1 parent fead154 commit f4e2215
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/updatenotification/lib/Notification/BackgroundJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ protected function sendErrorNotifications($numDays) {
->setSubject('connection_error', ['days' => $numDays]);

foreach ($this->getUsersToNotify() as $uid) {
$notification->setUser($uid);
$notification->setUser((string) $uid);

Check notice

Code scanning / Psalm

RedundantCastGivenDocblockType Note

Redundant cast to string given docblock-provided type
$this->notificationManager->notify($notification);
}
} catch (\InvalidArgumentException $e) {
Expand Down Expand Up @@ -181,7 +181,7 @@ protected function createNotifications($app, $version, $visibleVersion = '') {
}

foreach ($this->getUsersToNotify() as $uid) {
$notification->setUser($uid);
$notification->setUser((string) $uid);

Check notice

Code scanning / Psalm

RedundantCastGivenDocblockType Note

Redundant cast to string given docblock-provided type
$this->notificationManager->notify($notification);
}
} catch (\InvalidArgumentException $e) {
Expand Down

0 comments on commit f4e2215

Please sign in to comment.