← Back to team overview

mahara-contributors team mailing list archive

[Bug 1871249] A change has been merged

 

Reviewed:  https://reviews.mahara.org/10896
Committed: https://git.mahara.org/mahara/mahara/commit/46156bda60ac26173cf001358b6e73a1cc871708
Submitter: Robert Lyon (robertl@xxxxxxxxxxxxxxx)
Branch:    19.04_STABLE

commit 46156bda60ac26173cf001358b6e73a1cc871708
Author: Lisa Seeto <lisaseeto@xxxxxxxxxxxxxxx>
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 <lisaseeto@xxxxxxxxxxxxxxx>
(cherry picked from commit fb3f7e75bfb477587a02ce2712bf621f9b0f55d6)

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


References