Details
-
Type:
Improvement
-
Status: Closed
-
Priority:
Major
-
Resolution: Won't Fix
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
Description
When making API calls and passing method arguments to the end-point, null values are not passed along.
This is an issue when
- Manually passing null as an argument
- Attempting to set null as an argument to a method apart of a file encoded by ioncube
- For example, AppModel::systemEncrypt($value, $key = null, $iv = null) must be passed all arguments because ioncube causes the error "Internal error: Failed to retrieve the default value"
Update the Api controller to allow null parameters to be passed.
i.e.
if (isset($parameters[$param->name])) {
probably needs to be
if (array_key_exists($param->name, $parameters)) {
Issue Links
- relates to
-
CORE-1232 Calling AppModel methods with default params via API results in error
-
- Closed
-
It wouldn't be possible to accept null values from the API because it's not possible to pass null. If a key is set, the value would likely be a blank (empty) string.