Check if users is set
Error: Undefined array key "users" Exception: array_keys(): Argument #1 ($array) must be of type array, null given
In which case can it be empty? Do you have reproduction steps?
No sorry, just some errors like these in the logs...
I am wondering if this won't juste hide another issue. Can you investigate ?
Hello there, Thank you so much for taking the time and effort to create a pull request to our Nextcloud project.
We hope that the reviewing process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR reviewing process.
Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6
Thank you for contributing to Nextcloud and we hope to hear from you soon!
Any news @solracsf ?
I'm wondering if
$affectedUsers = $accessList['users'] ?? [];
could be a better solution here. Passing an empty array in case of null would not invalidate further logic in the array_merge and fix the "not an array" exception. 🤔
Maybe. Do you still have the log?
This will also fix:
array_keys(): Argument #1 ($array) must be of type array, null given in file '/var/www/nextcloud/apps/activity/lib/FilesHooks.php' line 243"
Can we go ahead and merge + backport it?
I think this should be fixed in getUserPathsFromPath because there are other places where it is used
2 flaky tests on run #1518 ↗︎
Details:
| Check if users is set | |||
| Project: Activity | Commit: 8304752230 |
||
| Status: Passed | Duration: 03:16 💡 | ||
| Started: May 7, 2024 6:35 PM | Ended: May 7, 2024 6:39 PM | ||
cypress/e2e/sidebar.cy.ts • 2 flaky tests • Run E2E
| Test | Artifacts | |
|---|---|---|
| Check activity listing in the sidebar > Has favorite activity |
Test Replay
Screenshots
|
|
| Check activity listing in the sidebar > Has share activity |
Test Replay
Screenshots
|
|
Review all test suite changes for PR #1281 ↗︎
I think this should be fixed in
getUserPathsFromPathbecause there are other places where it is used
I think this is still valid to not just hide issues
@ solracsf Is this problem is related to #1056 ? Can you Check if following commit helps: 8facb65a39e4a49e11255acd417e06f3ec016f45
Maybe, but as long as I don't see this in logs a long time ago, and this PR is not the good approach anyway, closing here 👍