From 4d2c96861dfb9a57900ac150ee4ef8e20c5e0bb5 Mon Sep 17 00:00:00 2001 From: Marina Glancy Date: Wed, 21 Apr 2021 22:48:51 +0200 Subject: [PATCH] MDL-71397 mod_glossary: empty category is the same as all categories In PHP8 empty string is not equal to zero --- mod/glossary/lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mod/glossary/lib.php b/mod/glossary/lib.php index 81f2899ac24..d6d670b6c19 100644 --- a/mod/glossary/lib.php +++ b/mod/glossary/lib.php @@ -1949,7 +1949,7 @@ function glossary_print_categories_menu($cm, $glossary, $hook, $category) { echo get_string("entrieswithoutcategory","glossary"); $selected = GLOSSARY_SHOW_NOT_CATEGORISED; - } elseif ( $hook == GLOSSARY_SHOW_ALL_CATEGORIES ) { + } else if ( empty($hook) ) { echo get_string("allcategories","glossary"); $selected = GLOSSARY_SHOW_ALL_CATEGORIES;