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 <josh.t.richards@gmail.com>
  • Loading branch information
joshtrichards committed Mar 8, 2024
1 parent e5b2c0f commit 4fedc74
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/updatenotification/lib/Notification/BackgroundJob.php
Expand Up @@ -118,7 +118,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 @@ -186,7 +186,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 4fedc74

Please sign in to comment.