Uh oh!
There was an error while loading. Please reload this page.
fix(appstore): Ensure returned apps from AppStore are valid - #47854
Conversation
b1246a9 to
ae17f47Compare
come-nc
left a comment
There was a problem hiding this comment.
This does not fix the linked TypeError from what I understand.
The problem of the TypeError is more that $response['data'] was not set I suppose?
Any idea what the response looked like? Because if it was empty it would return early line 57 already.
solracsf
commented
Sep 10, 2024
My analysis was that some elements of By adding the |
No @come-nc's analysis is right: will give you Which is exactly the same error message. The error message clearly mentions the method and the argument. Running results in no error. |
provokateurin
left a comment
There was a problem hiding this comment.
The if (empty($response)) { check further up should be extended to be if (empty($response) || $response['data'] === null) {.
provokateurin
commented
Sep 10, 2024
If no callback is given to array_filter it will remove all falsy values which includes null, so null is not an invalid element in the given array. |
d4f8e65 to
f02902cComparesolracsf
commented
Sep 10, 2024
Thanks for your inputs, six eyes see better than two 🤣 |
provokateurin
commented
Sep 10, 2024
I wonder if we should have a warning log for the return case to inform the admin that the appstore returned a faulty response? Otherwise it is just silent and they can't know why. |
solracsf
commented
Sep 10, 2024
Agree. Maybe something like: This should inform admin that response was not valid, but also this could be temporary and it can be retried (in case appstore is down for maintenance, overloaded...). |
provokateurin
commented
Sep 10, 2024
Sounds good, but I would either omit the app parameter or set it to core. |
solracsf
commented
Sep 10, 2024
All the other warnings have it, that's why I've included it. 🤔 |
provokateurin
commented
Sep 10, 2024
Ah ok, then it's good. Can you add it to the PR? |
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com> fix: lint chore: remove space Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com> fix: check if response array is null Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com> chore: Add log
f02902c to
8585b05Comparesolracsf
commented
Sep 11, 2024
Done ✅ |
provokateurin
commented
Sep 11, 2024
/backport to stable30 |
provokateurin
commented
Sep 11, 2024
/backport to stable29 |
provokateurin
commented
Sep 11, 2024
/backport to stable28 |
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com> Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
Checklist