Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

MDL-31077 REST server should return null if nothing fail and if the d…

…escription function return null.
  • Loading branch information...
commit 2ada59b759fc1088e8d5ab7e287bfd8669ab7b23 1 parent 60e9909
@mouneyrac mouneyrac authored
Showing with 5 additions and 1 deletion.
  1. +5 −1 webservice/rest/locallib.php
View
6 webservice/rest/locallib.php
@@ -85,7 +85,11 @@ protected function send_response() {
//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;
}
Please sign in to comment.
Something went wrong with that request. Please try again.