Reviewed: https://reviews.mahara.org/10859 Committed: https://git.mahara.org/mahara/mahara/commit/fb3f7e75bfb477587a02ce2712bf621f9b0f55d6 Submitter: Robert Lyon ([email protected]) Branch: 19.10_STABLE
commit fb3f7e75bfb477587a02ce2712bf621f9b0f55d6 Author: Lisa Seeto <[email protected]> Date: Tue Apr 7 12:32:52 2020 +1200 Bug 1871249: Shared access with users produces a warning in 19.10 when search results count = 0 - added in check for when data['data'] is empty for user search - refactored friends, default cases as it was using the same code - clean up unused variable Change-Id: I5e73ff0894bee57f945fdc6b347ee5a9100d1bd4 Signed-off-by: Lisa Seeto <[email protected]> -- You received this bug notification because you are a member of Mahara Contributors, which is subscribed to Mahara. Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it! https://bugs.launchpad.net/bugs/1871249 Title: Shared access with users produces a warning in 19.10 when search results count = 0 Status in Mahara: Fix Committed Status in Mahara 19.04 series: Fix Committed Status in Mahara 19.10 series: Fix Committed Bug description: The code currently in 19.10 to share access with 'Users' will produce a warning when the search count is 0, i.e a site that has no current users. It's possible there are other ways to return a User search count of 0 but this is the most reliable for testing purposes. The warning message is: [WAR] c4 (view/access.json.php:60) Invalid argument supplied for foreach() To reproduce: 1. On a fresh install of Mahara 19.10 codebase with no users, create a page. 2. Navigate to "Share" and select to edit share access for the new page 3. Select "User" from dropdown box and scroll on the drop down to select a User (it will say No results found) 4. Refresh the page Expected results: Page displays no warnings Actual results: Page displays with a warning message This is happening in 19.10 (possibly a fix needs to be applied to earlier versions of the code). This issue didn't affect code after 19.10. To manage notifications about this bug go to: https://bugs.launchpad.net/mahara/+bug/1871249/+subscriptions _______________________________________________ Mailing list: https://launchpad.net/~mahara-contributors Post to : [email protected] Unsubscribe : https://launchpad.net/~mahara-contributors More help : https://help.launchpad.net/ListHelp

