[eGroupWare-svn] r55939 - /trunk/egroupware/api/categories.php

[email protected] Fri, 29 Apr 2016 11:59:53 -0000
Newsgroups gmane.comp.web.egroupware.cvs
Message-ID <[email protected]>
Author: ralfbecker
Date: Fri Apr 29 13:59:53 2016
New Revision: 55939

URL: http://svn.stylite.de/viewvc/egroupware?rev=55939&view=rev
Log:
silencing "Illigal string offset" errors

Modified:
    trunk/egroupware/api/categories.php

Modified: trunk/egroupware/api/categories.php
URL: http://svn.stylite.de/viewvc/egroupware/trunk/egroupware/api/categories.php?rev=55939&r1=55938&r2=55939&view=diff
==============================================================================
--- trunk/egroupware/api/categories.php (original)
+++ trunk/egroupware/api/categories.php Fri Apr 29 13:59:53 2016
@@ -36,13 +36,14 @@
 
 foreach($categories as $cat)
 {
-	if($cat['data']['color'])
+	if (!isset($cat['data'])) continue;
+	if (!empty($cat['data']['color']))
 	{
 		// Use slightly more specific selector that just class, to allow defaults
 		// if the category has no color
 		$content .= "tr.cat_{$cat['id']} {border-left:6px solid {$cat['data']['color']};} div.cat_{$cat['id']}, span.cat_{$cat['id']} { background-color: {$cat['data']['color']};} /*{$cat['name']}*/\n";
 	}
-	if($cat['data']['icon'])
+	if (!empty($cat['data']['icon']))
 	{
 		$content .= ".cat_{$cat['id']} .cat_icon { background-image: url('". admin_categories::icon_url($cat['data']['icon']) ."');} /*{$cat['name']}*/\n";
 	}


------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z