Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 2.3.4, 2.4.1, 2.5
-
Component/s: Web Services
-
Labels:None
-
Testing Instructions:
-
Affected Branches:MOODLE_23_STABLE, MOODLE_24_STABLE, MOODLE_25_STABLE
-
Fixed Branches:MOODLE_23_STABLE, MOODLE_24_STABLE
-
Pull from Repository:
-
Pull Master Branch:
MDL-37961-master -
Pull Master Diff URL:
Description
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;
|