aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2025-04-02 10:53:13 +0000
committerMario <mario@mariovavti.com>2025-04-02 10:53:13 +0000
commitfe8ae2f88efbb2321e13ee3fa2810414a8fc322d (patch)
treec3a4687696c6f528193210d35c9cb14058b855c1 /Zotlabs
parent3550609d293ec4ad85c5c9ba0d940f001a7d2810 (diff)
downloadvolse-hubzilla-fe8ae2f88efbb2321e13ee3fa2810414a8fc322d.tar.gz
volse-hubzilla-fe8ae2f88efbb2321e13ee3fa2810414a8fc322d.tar.bz2
volse-hubzilla-fe8ae2f88efbb2321e13ee3fa2810414a8fc322d.zip
make sure we have an encoded activity before we go on building the packet, do not json_encode() a possibly empty item.target
Diffstat (limited to 'Zotlabs')
-rw-r--r--Zotlabs/Daemon/Notifier.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/Zotlabs/Daemon/Notifier.php b/Zotlabs/Daemon/Notifier.php
index 043b406cc..b32a047a3 100644
--- a/Zotlabs/Daemon/Notifier.php
+++ b/Zotlabs/Daemon/Notifier.php
@@ -323,7 +323,13 @@ class Notifier {
self::$encoded_item = json_decode($m, true);
}
else {
- self::$encoded_item = Activity::build_packet(Activity::encode_activity($target_item), self::$channel, false);
+ $activity = Activity::encode_activity($target_item);
+
+ if (!$activity) {
+ return;
+ }
+
+ self::$encoded_item = Activity::build_packet($activity, self::$channel, false);
}
logger('target_item: ' . print_r($target_item, true), LOGGER_DEBUG);