From 2c5ec833bcfc4ec79b16fa9ee0cf9e23b5f2e84d Mon Sep 17 00:00:00 2001 From: tjhunt Date: Tue, 25 Aug 2009 19:09:04 +0000 Subject: [PATCH] outputlib MDL-20103 neater version of Jerome's fix. --- lib/outputrenderers.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/outputrenderers.php b/lib/outputrenderers.php index f906ee3703f..7144e744a3c 100644 --- a/lib/outputrenderers.php +++ b/lib/outputrenderers.php @@ -1005,10 +1005,8 @@ class moodle_core_renderer extends moodle_renderer_base { $lis = array(); foreach ($items as $key => $string) { $item = $this->output_start_tag('li', array('class' => 'r' . $row)); - if ($icons) { - if (key_exists($key, $icons)) { //test if the content has an assigned icon - $item .= $this->output_tag('div', array('class' => 'icon column c0'), $icons[$key]); - } + if (!empty($icons[$key])) { //test if the content has an assigned icon + $item .= $this->output_tag('div', array('class' => 'icon column c0'), $icons[$key]); } $item .= $this->output_tag('div', array('class' => 'column c1'), $string); $item .= $this->output_end_tag('li');