-
Bug
-
Resolution: Fixed
-
Minor
-
2.3.4, 2.4.1, 2.5
-
None
-
MOODLE_23_STABLE, MOODLE_24_STABLE, MOODLE_25_STABLE
-
MOODLE_23_STABLE, MOODLE_24_STABLE
-
MDL-37961-master -
There is an eval() error when creating the definition of the functions when a webservice function uses a PARAM_BOOL as PARAM_DEFAULT, and set the default to false.
Ie:
public static function search_contacts_parameters() {
|
return new external_function_parameters(
|
array(
|
'searchtext' => new external_value(PARAM_CLEAN, 'String the user\'s fullname has to match to be found'),
|
'onlymycourses' => new external_value(PARAM_BOOL, 'Limit search to the user\'s courses',
|
VALUE_DEFAULT, false)
|
)
|
);
|
}
|
Will cause this to be generated:
public function core_message_search_contacts($searchtext, $onlymycourses=) {
|
The problem being here:
# webservice/lib.php:1193
|
case PARAM_BOOL:
|
$paramanddefault .= '='.$keydesc->default; break;
|