From 3497ced9f9a8fb42311165b35ce709ec90f0bce9 Mon Sep 17 00:00:00 2001 From: Mario Date: Mon, 3 Jul 2023 10:49:34 +0000 Subject: =?UTF-8?q?=C3=83fix=20php=20warning?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Zotlabs/Lib/IConfig.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'Zotlabs/Lib') diff --git a/Zotlabs/Lib/IConfig.php b/Zotlabs/Lib/IConfig.php index 33d94bd49..74c1107f0 100644 --- a/Zotlabs/Lib/IConfig.php +++ b/Zotlabs/Lib/IConfig.php @@ -13,7 +13,7 @@ class IConfig { static public function Get(&$item, $family, $key, $default = false) { $is_item = false; - + if(is_array($item)) { $is_item = true; if((! array_key_exists('iconfig',$item)) || (! is_array($item['iconfig']))) @@ -22,7 +22,7 @@ class IConfig { if(array_key_exists('item_id',$item)) $iid = $item['item_id']; else - $iid = $item['id']; + $iid = $item['id'] ?? 0; } elseif(intval($item)) $iid = $item; @@ -36,7 +36,7 @@ class IConfig { return $c['v']; } } - + $r = q("select * from iconfig where iid = %d and cat = '%s' and k = '%s' limit 1", intval($iid), dbesc($family), @@ -63,11 +63,11 @@ class IConfig { * $value - value of meta variable * $sharing - boolean (default false); if true the meta information is propagated with the item * to other sites/channels, mostly useful when $item is an array and has not yet been stored/delivered. - * If the meta information is added after delivery and you wish it to be shared, it may be necessary to - * alter the item edited timestamp and invoke the delivery process on the updated item. The edited + * If the meta information is added after delivery and you wish it to be shared, it may be necessary to + * alter the item edited timestamp and invoke the delivery process on the updated item. The edited * timestamp needs to be altered in order to trigger an item_store_update() at the receiving end. */ - + static public function Set(&$item, $family, $key, $value, $sharing = false) { @@ -162,4 +162,4 @@ class IConfig { } -} \ No newline at end of file +} -- cgit v1.2.3