X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FCore%2FProtocol.php;h=25955abd5090d21d3387e75cc02d98d00bc20bf5;hb=82972744a9cb77ca3d2f8db289e97fee2709ebd7;hp=015612adeaea1af9575727792f25b89ef41e965c;hpb=bbe05f523fbb73e34a909e247afab9be77481f70;p=friendica.git diff --git a/src/Core/Protocol.php b/src/Core/Protocol.php index 015612adea..25955abd50 100644 --- a/src/Core/Protocol.php +++ b/src/Core/Protocol.php @@ -182,7 +182,8 @@ class Protocol public static function unfollow(array $contact, array $user): ?bool { if (empty($contact['network'])) { - throw new \InvalidArgumentException('Missing network key in contact array'); + Logger::notice('Contact has got no network, we quit here', ['id' => $contact['id']]); + return null; } $protocol = $contact['network']; @@ -205,7 +206,8 @@ class Protocol $slap = OStatus::salmon($item, $user); if (empty($contact['notify'])) { - throw new \InvalidArgumentException('Missing expected "notify" key in OStatus/DFRN contact'); + Logger::notice('OStatus/DFRN Contact is missing notify, we quit here', ['id' => $contact['id']]); + return null; } return Salmon::slapper($user, $contact['notify'], $slap) === 0;