From 0f31850a35319fb2d6245a8e72fd25554facae9b Mon Sep 17 00:00:00 2001 From: jerome mouneyrac Date: Tue, 6 Jul 2010 09:17:49 +0000 Subject: [PATCH] webservice MDL-22255 fix moodle_user_get_users_by_id() ws function when no custom field are returned --- user/externallib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user/externallib.php b/user/externallib.php index e061ddeec96..c5e3f5b8f71 100644 --- a/user/externallib.php +++ b/user/externallib.php @@ -354,7 +354,7 @@ class moodle_user_external extends external_api { $userarray = (array) $user; //we want to return an array not an object /// now we transfert all profile_field_xxx into the customfields external_multiple_structure required by description - $userarray['customfields'] = null; + $userarray['customfields'] = array(); $customfields = profile_user_record($user->id); $customfields = (array) $customfields; foreach ($customfields as $key => $value) {