From dfdfe762b12db0056ac8d428140a426857496061 Mon Sep 17 00:00:00 2001 From: jerome Date: Wed, 11 Mar 2009 04:28:04 +0000 Subject: [PATCH] web service MDL-12886 documentation: manage no return value into the description array --- webservice/documentation.php | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/webservice/documentation.php b/webservice/documentation.php index 2b693a85095..06f59c77960 100644 --- a/webservice/documentation.php +++ b/webservice/documentation.php @@ -104,18 +104,21 @@ EOF; $documentation .= <<) : EOF; - foreach($functiondescription['return'] as $return => $type) { - $documentation .= << - {$type} -EOF; - if (is_array($type)) { - $arraytype = "
".print_r($type, true)."
"; + if (array_key_exists('return', $functiondescription)) { + foreach($functiondescription['return'] as $return => $type) { $documentation .= << + {$type} +EOF; + if (is_array($type)) { + $arraytype = "
".print_r($type, true)."
"; + $documentation .= << {$return} {$arraytype}

EOF; + } } } + foreach($functiondescription['params'] as $param => $type) { if (is_array($type)) {