MDL-76088 blocks: fixed incorrect use of static cache

This commit is contained in:
Marina Glancy
2022-11-28 11:58:47 +01:00
parent 57c1e97bf1
commit 130d371ccf
+2 -6
View File
@@ -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);
}
/**