Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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
Jérôme Mouneyrac authored January 17, 2012

Showing 1 changed file with 5 additions and 1 deletion. Show diff stats Hide diff stats

  1. 6  webservice/rest/locallib.php
6  webservice/rest/locallib.php
@@ -85,7 +85,11 @@ protected function send_response() {
85 85
 
86 86
         //Check that the returned values are valid
87 87
         try {
88  
-            $validatedvalues = external_api::clean_returnvalue($this->function->returns_desc, $this->returns);
  88
+            if ($this->function->returns_desc != null) {
  89
+                $validatedvalues = external_api::clean_returnvalue($this->function->returns_desc, $this->returns);
  90
+            } else {
  91
+                $validatedvalues = null;
  92
+            }
89 93
         } catch (Exception $ex) {
90 94
             $exception = $ex;
91 95
         }

0 notes on commit 2ada59b

Please sign in to comment.
Something went wrong with that request. Please try again.