diff options
Diffstat (limited to 'Zotlabs/Lib/IConfig.php')
-rw-r--r-- | Zotlabs/Lib/IConfig.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Zotlabs/Lib/IConfig.php b/Zotlabs/Lib/IConfig.php index 74c1107f0..3540c2b24 100644 --- a/Zotlabs/Lib/IConfig.php +++ b/Zotlabs/Lib/IConfig.php @@ -13,6 +13,7 @@ class IConfig { static public function Get(&$item, $family, $key, $default = false) { $is_item = false; + $iid = null; if(is_array($item)) { $is_item = true; @@ -27,12 +28,13 @@ class IConfig { elseif(intval($item)) $iid = $item; - if(! $iid) + if (!$iid) return $default; + if(is_array($item) && array_key_exists('iconfig',$item) && is_array($item['iconfig'])) { foreach($item['iconfig'] as $c) { - if($c['iid'] == $iid && $c['cat'] == $family && $c['k'] == $key) + if (isset($c['iid']) && $c['iid'] == $iid && isset($c['cat']) && $c['cat'] == $family && isset($c['k']) && $c['k'] == $key) return $c['v']; } } |