mirror of
https://github.com/friendica/friendica
synced 2025-04-26 11:50:11 +00:00
Check for the existence of array key before using it in Protocol\ActivityPub\Transmitter
- Address https://github.com/friendica/friendica/issues/9252#issuecomment-739534960
This commit is contained in:
parent
99828c0fea
commit
c7a2988454
2 changed files with 6 additions and 2 deletions
|
@ -1003,10 +1003,10 @@ class Transmitter
|
|||
* @param integer $item_id
|
||||
* @param boolean $object_mode Is the activity item is used inside another object?
|
||||
*
|
||||
* @return array of activity
|
||||
* @return false|array
|
||||
* @throws \Exception
|
||||
*/
|
||||
public static function createActivityFromItem($item_id, $object_mode = false)
|
||||
public static function createActivityFromItem(int $item_id, bool $object_mode = false)
|
||||
{
|
||||
Logger::info('Fetching activity', ['item' => $item_id]);
|
||||
$item = Item::selectFirst([], ['id' => $item_id, 'parent-network' => Protocol::NATIVE_SUPPORT]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue