From 181c142bb484fc15e99b68871434c120d3ae3482 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sat, 2 Jul 2022 22:16:46 -0400 Subject: [PATCH] Remove overly strict type-hint in ActivityPub\Transmission::createCachedActivityFromItem - Fix "Return value of Friendica\Protocol\ActivityPub\Transmitter::createCachedActivityFromItem() must be of the type array, bool returned" error --- src/Protocol/ActivityPub/Transmitter.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Protocol/ActivityPub/Transmitter.php b/src/Protocol/ActivityPub/Transmitter.php index d7995a8d1..5b4f29028 100644 --- a/src/Protocol/ActivityPub/Transmitter.php +++ b/src/Protocol/ActivityPub/Transmitter.php @@ -1190,10 +1190,10 @@ class Transmitter * * @param integer $item_id Item id * @param boolean $force Force new cache entry - * @return array with the activity + * @return array|false activity or false on failure * @throws \Exception */ - public static function createCachedActivityFromItem(int $item_id, bool $force = false): array + public static function createCachedActivityFromItem(int $item_id, bool $force = false) { $cachekey = 'APDelivery:createActivity:' . $item_id;