diff --git a/webservice/renderer.php b/webservice/renderer.php index f607d19e21573..a7b1bec08ef06 100644 --- a/webservice/renderer.php +++ b/webservice/renderer.php @@ -52,7 +52,7 @@ public function detailed_description_html($params) { $required = ''; } if ($params->required == VALUE_DEFAULT) { - if (empty($params->default)) { + if ($params->default === null) { $params->default = "null"; } $required = html_writer::start_tag('b', array()).get_string('default', 'webservice', $params->default).html_writer::end_tag('b'); @@ -335,7 +335,7 @@ public function documentation_html($functions, $printableformat, $activatedproto $required = get_string('required', 'webservice'); } if ($paramdesc->required == VALUE_DEFAULT) { - if (empty($paramdesc->default)) { + if ($paramdesc->default === null) { $default = "null"; } else { $default = $paramdesc->default;