Skip to content

Conversation

@joshtrichards
Copy link
Member

Summary

getUsersToNotify() uses array_key so when $uid happens to be numeric it ends up needing to be cast here (similar to #15912).

Backports will need to be done manually due to restructure that occurred in >v28 (I'll follow-up with those).

TODO

  • ...

Checklist


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

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
joshtrichards added a commit that referenced this pull request Mar 8, 2024
manual backport of #44093 to fix #44051 for <=v28

Signed-off-by: Josh <[email protected]>
@susnux
Copy link
Contributor

susnux commented Mar 8, 2024

getUsersToNotify() uses array_key

This is no longer the case, array_unique and array_values are used.

@nickvergessen
Copy link
Member

28 and lower with the bug is fixed via #44095

@nickvergessen nickvergessen deleted the fix/updatenotifications/numeric-ids-master branch March 8, 2024 22:15
backportbot bot pushed a commit that referenced this pull request Mar 8, 2024
manual backport of #44093 to fix #44051 for <=v28

Signed-off-by: Josh <[email protected]>
backportbot bot pushed a commit that referenced this pull request Mar 8, 2024
manual backport of #44093 to fix #44051 for <=v28

Signed-off-by: Josh <[email protected]>
joshtrichards added a commit that referenced this pull request Mar 10, 2024
manual backport of #44093 to fix #44051 for <=v28

Signed-off-by: Josh <[email protected]>
joshtrichards added a commit that referenced this pull request Mar 12, 2024
manual backport of #44093 to fix #44051 for <=v28

Signed-off-by: Josh <[email protected]>
@skjnldsv skjnldsv removed this from the Nextcloud 29 milestone Aug 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Nummeric user id breaks updatenotifications

5 participants