activity icon indicating copy to clipboard operation
activity copied to clipboard

Check if users is set

Open solracsf opened this issue 2 years ago • 11 comments

Error: Undefined array key "users" Exception: array_keys(): Argument #1 ($array) must be of type array, null given

solracsf avatar Aug 12 '23 07:08 solracsf

In which case can it be empty? Do you have reproduction steps?

artonge avatar Aug 18 '23 13:08 artonge

No sorry, just some errors like these in the logs...

solracsf avatar Aug 18 '23 16:08 solracsf

I am wondering if this won't juste hide another issue. Can you investigate ?

artonge avatar Aug 18 '23 16:08 artonge

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!

github-actions[bot] avatar Aug 27 '23 02:08 github-actions[bot]

Any news @solracsf ?

artonge avatar Oct 04 '23 12:10 artonge

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. 🤔

solracsf avatar Oct 05 '23 13:10 solracsf

Maybe. Do you still have the log?

artonge avatar Oct 11 '23 08:10 artonge

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?

solracsf avatar Jan 22 '24 14:01 solracsf

I think this should be fixed in getUserPathsFromPath because there are other places where it is used

susnux avatar Jan 22 '24 19:01 susnux

2 flaky tests on run #1518 ↗︎

0 10 0 0 Flakiness 2

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
Flakiness  cypress/e2e/sidebar.cy.ts • 2 flaky tests • Run E2E

View Output

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 ↗︎

cypress[bot] avatar May 07 '24 18:05 cypress[bot]

I think this should be fixed in getUserPathsFromPath because there are other places where it is used

I think this is still valid to not just hide issues

susnux avatar May 07 '24 21:05 susnux

@ solracsf Is this problem is related to #1056 ? Can you Check if following commit helps: 8facb65a39e4a49e11255acd417e06f3ec016f45

Messj1 avatar Jul 18 '24 02:07 Messj1

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 👍

solracsf avatar Jul 18 '24 08:07 solracsf