Details
-
Type:
Improvement
-
Status: Open
-
Priority:
Minor
-
Resolution: Unresolved
-
Affects Version/s: 2.0, Future Dev
-
Fix Version/s: DEV backlog
-
Component/s: Web Services
-
Labels:
-
Affected Branches:MOODLE_20_STABLE
Description
This morning we had an interesting question wit Martin about to send a null parameter in a web service call.
For example in the update_user function, we could have a field:
'age' => new external_value(PARAM_INT, 'User age', VALUE_OPTIONAL),
Imagine that the ws client wants to set this field to null. (because he entered a wrong age and finally he doesn't really know what is the user age.)
In this case a solution could be:
the ws client sends a '' or 'null' value. Then the external update_user function compare this value, and replace by php null, before to call the validate_parameters function.
Attachments
Issue Links
- has a non-specific relationship to
-
MDLSITE-3041 reverse sync 1.9 registration data to moodle.net for linkchecking
-
- Resolved
-