From ba2ad4316ed299996b5a53bc0b4e7264422969ae Mon Sep 17 00:00:00 2001 From: Marina Glancy Date: Mon, 24 Aug 2015 10:59:30 +0800 Subject: [PATCH] MDL-51184 themes: correctly check $CFG->svgicons Thanks to Ralf Wiederhold for pointing out the bug --- lib/outputlib.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/outputlib.php b/lib/outputlib.php index 35e2f34a522..87e5c73af2d 100644 --- a/lib/outputlib.php +++ b/lib/outputlib.php @@ -1660,11 +1660,11 @@ class theme_config { global $CFG; if ($this->usesvg === null) { - if (!isset($CFG->svgicons) || !is_bool($CFG->svgicons)) { + if (!isset($CFG->svgicons)) { $this->usesvg = core_useragent::supports_svg(); } else { // Force them on/off depending upon the setting. - $this->usesvg = $CFG->svgicons; + $this->usesvg = (bool)$CFG->svgicons; } } return $this->usesvg;