From 130d371ccfa6fa7c7df98ebb1fb7e723d6a76aaa Mon Sep 17 00:00:00 2001 From: Marina Glancy Date: Wed, 26 Oct 2022 11:21:42 +0200 Subject: [PATCH] MDL-76088 blocks: fixed incorrect use of static cache --- blocks/moodleblock.class.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/blocks/moodleblock.class.php b/blocks/moodleblock.class.php index 9d0a21273c6..393e90a8c78 100644 --- a/blocks/moodleblock.class.php +++ b/blocks/moodleblock.class.php @@ -132,12 +132,8 @@ class block_base { function name() { // Returns the block name, as present in the class name, // the database, the block directory, etc etc. - static $myname; - if ($myname === NULL) { - $myname = strtolower(get_class($this)); - $myname = substr($myname, strpos($myname, '_') + 1); - } - return $myname; + $myname = strtolower(get_class($this)); + return substr($myname, strpos($myname, '_') + 1); } /**