diff --git a/mod/data/classes/template.php b/mod/data/classes/template.php index 7516e3627ff..17231d8a957 100644 --- a/mod/data/classes/template.php +++ b/mod/data/classes/template.php @@ -436,7 +436,11 @@ class template { $fields = $this->manager->get_fields(); list($formats, $files) = data_portfolio_caller::formats($fields, $entry); $button->set_formats($formats); - return $button->to_html(PORTFOLIO_ADD_ICON_LINK); + $result = $button->to_html(PORTFOLIO_ADD_ICON_LINK); + if (is_null($result)) { + $result = ''; + } + return $result; } /**