Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
[stable28] fix(UpdateNotifications): Handle numeric user ids
manual backport of #44093 to fix #44051 for <=v28

Signed-off-by: Josh <[email protected]>
  • Loading branch information
joshtrichards committed Mar 12, 2024
commit 1f8dc636812ea2ff81679814e08de2f028b5ecd1
4 changes: 2 additions & 2 deletions apps/updatenotification/lib/Notification/BackgroundJob.php
Original file line number Diff line number Diff line change
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

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

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