aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Lib
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2022-10-18 12:39:13 +0200
committerMario Vavti <mario@mariovavti.com>2022-10-18 12:39:13 +0200
commite9ca17cec14c5a702cc7d656e5206a3c086dd550 (patch)
tree0770b4274c0e109056199db55429b0801b3ce60c /Zotlabs/Lib
parentf70956964be5792be296a4e3ec1889a4be2fd475 (diff)
downloadvolse-hubzilla-e9ca17cec14c5a702cc7d656e5206a3c086dd550.tar.gz
volse-hubzilla-e9ca17cec14c5a702cc7d656e5206a3c086dd550.tar.bz2
volse-hubzilla-e9ca17cec14c5a702cc7d656e5206a3c086dd550.zip
fix php warnings
Diffstat (limited to 'Zotlabs/Lib')
-rw-r--r--Zotlabs/Lib/Activity.php8
-rw-r--r--Zotlabs/Lib/Libzot.php2
2 files changed, 9 insertions, 1 deletions
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);
diff --git a/Zotlabs/Lib/Libzot.php b/Zotlabs/Lib/Libzot.php
index 2da829ba2..77b481c25 100644
--- a/Zotlabs/Lib/Libzot.php
+++ b/Zotlabs/Lib/Libzot.php
@@ -1945,7 +1945,7 @@ class Libzot {
return false;
}
- if ($a['data']['type'] !== 'OrderedCollection') {
+ if (isset($a['data']['type']) && $a['data']['type'] !== 'OrderedCollection') {
return false;
}