From e9ca17cec14c5a702cc7d656e5206a3c086dd550 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Tue, 18 Oct 2022 12:39:13 +0200 Subject: fix php warnings --- Zotlabs/Lib/Activity.php | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'Zotlabs/Lib/Activity.php') diff --git a/Zotlabs/Lib/Activity.php b/Zotlabs/Lib/Activity.php index 26aef8104..633f18235 100644 --- a/Zotlabs/Lib/Activity.php +++ b/Zotlabs/Lib/Activity.php @@ -68,6 +68,10 @@ class Activity { else { $m = parse_url($url); + if (!$m) { + return null; + } + // handle bearcaps if ($m['scheme'] === 'bear') { $params = explode('&', $m['query']); @@ -2262,6 +2266,10 @@ class Activity { $obj_actor = ((isset($act->obj['actor'])) ? $act->obj['actor'] : $act->get_actor('attributedTo', $act->obj)); + if (!isset($obj_actor['id'])) { + return false; + } + // ensure we store the original actor self::actor_store($obj_actor['id'], $obj_actor); -- cgit v1.2.3