mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 05:58:34 +01:00
MDL-29471 php warning when adding function to a new web service
This commit is contained in:
parent
216f6d8e9d
commit
e1cf6b4be2
@ -160,7 +160,7 @@ class external_service_functions_form extends moodleform {
|
||||
$functions[$functionid] = $function->name . ':' . $function->description;
|
||||
}
|
||||
|
||||
$mform->addElement('searchableselector', 'fid', get_string('name'),
|
||||
$mform->addElement('searchableselector', 'fids', get_string('name'),
|
||||
$functions, array('multiple'));
|
||||
|
||||
$mform->addElement('hidden', 'id');
|
||||
|
@ -67,7 +67,7 @@ switch ($action) {
|
||||
//add the function to the service then redirect to function list page
|
||||
if ($data = $mform->get_data()) {
|
||||
ignore_user_abort(true); // no interruption here!
|
||||
foreach ($data->fid as $fid) {
|
||||
foreach ($data->fids as $fid) {
|
||||
$function = $webservicemanager->get_external_function_by_id(
|
||||
$fid, MUST_EXIST);
|
||||
// make sure the function is not there yet
|
||||
|
Loading…
x
Reference in New Issue
Block a user