diff --git a/webservice/rest/locallib.php b/webservice/rest/locallib.php index 179a85b9f52..2c75799ab3c 100644 --- a/webservice/rest/locallib.php +++ b/webservice/rest/locallib.php @@ -85,7 +85,11 @@ class webservice_rest_server extends webservice_base_server { //Check that the returned values are valid try { - $validatedvalues = external_api::clean_returnvalue($this->function->returns_desc, $this->returns); + if ($this->function->returns_desc != null) { + $validatedvalues = external_api::clean_returnvalue($this->function->returns_desc, $this->returns); + } else { + $validatedvalues = null; + } } catch (Exception $ex) { $exception = $ex; }