fixed PHP 5.4 Warning: Illegal string offset

This commit is contained in:
Ralf Becker 2012-05-21 14:14:44 +00:00
parent 3e8501a139
commit feb6076acf

View File

@ -734,7 +734,7 @@ class etemplate_old extends boetemplate
}
$data = categories::id2name($cat,'data');
if (($color = $data['color']))
if (is_array($data) && ($color = $data['color']))
{
//echo "<p>cats2color('$cats')=$color</p>\n";
return $cat2color[$cats] = $cat2color[$cat] = $color;