From 522ee5ae4cc97077f07e2a9ba9401fedd0533e9b Mon Sep 17 00:00:00 2001 From: Paul Holden Date: Wed, 25 Jan 2023 16:57:58 +0000 Subject: [PATCH] MDL-77042 mod_data: fix empty/zero equality check for numeric field. --- mod/data/field/number/field.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mod/data/field/number/field.class.php b/mod/data/field/number/field.class.php index df75243ad8f..023f7c5dee3 100644 --- a/mod/data/field/number/field.class.php +++ b/mod/data/field/number/field.class.php @@ -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;