mirror of
https://github.com/moodle/moodle.git
synced 2025-04-20 16:04:25 +02:00
MDL-63850 core_message: prevent exception being thrown with empty array
This commit is contained in:
parent
308eb72448
commit
6981de1080
@ -489,6 +489,11 @@ class helper {
|
||||
public static function get_member_info(int $referenceuserid, array $userids) : array {
|
||||
global $DB, $PAGE;
|
||||
|
||||
// Prevent exception being thrown when array is empty.
|
||||
if (empty($userids)) {
|
||||
return [];
|
||||
}
|
||||
|
||||
list($useridsql, $usersparams) = $DB->get_in_or_equal($userids);
|
||||
$userfields = \user_picture::fields('u', array('lastaccess'));
|
||||
$userssql = "SELECT $userfields, u.deleted, mc.id AS contactid, mub.id AS blockedid
|
||||
|
Loading…
x
Reference in New Issue
Block a user