From ee8baf00ce35f3198aef34f2cc41200262623efa Mon Sep 17 00:00:00 2001 From: Michael Date: Mon, 1 Jul 2019 22:14:34 +0000 Subject: [PATCH] Now without array_merge --- src/Model/Contact.php | 2 +- src/Model/Item.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Model/Contact.php b/src/Model/Contact.php index 8cdf331b7a..a10c0d05e5 100644 --- a/src/Model/Contact.php +++ b/src/Model/Contact.php @@ -1587,7 +1587,7 @@ class Contact extends BaseObject return ''; } - if (in_array($contact["network"], array_merge(Protocol::FEDERATED ,['']))) { + if (empty($contact["network"]) || in_array($contact["network"], Protocol::FEDERATED)) { $sql = "(`item`.`uid` = 0 OR (`item`.`uid` = ? AND NOT `item`.`global`))"; } else { $sql = "`item`.`uid` = ?"; diff --git a/src/Model/Item.php b/src/Model/Item.php index 69d9c18856..c3ff0520bb 100644 --- a/src/Model/Item.php +++ b/src/Model/Item.php @@ -1354,7 +1354,7 @@ class Item extends BaseObject * We have to check several networks since Friendica posts could be repeated * via OStatus (maybe Diasporsa as well) */ - if (in_array($item['network'], array_merge(Protocol::FEDERATED ,['']))) { + if (empty($item['network']) || in_array($item['network'], Protocol::FEDERATED)) { $condition = ["`uri` = ? AND `uid` = ? AND `network` IN (?, ?, ?)", trim($item['uri']), $item['uid'], Protocol::DIASPORA, Protocol::DFRN, Protocol::OSTATUS]; -- 2.39.5