MDL-77042 mod_data: fix empty/zero equality check for numeric field.

This commit is contained in:
Paul Holden 2023-01-25 16:57:58 +00:00
parent 8de12b7997
commit 522ee5ae4c

View File

@ -64,7 +64,7 @@ class data_field_number extends data_field_base {
function display_browse_field($recordid, $template) {
$content = $this->get_data_content($recordid);
if (!$content || empty($content->content)) {
if (!$content || $content->content === '') {
return '';
}
$number = $content->content;