aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Lib/Activity.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2022-02-11 12:59:08 +0000
committerMario <mario@mariovavti.com>2022-02-11 12:59:08 +0000
commitd45e8e4d20645d860aee033ec6dab4c7c433d609 (patch)
treedbc9f7568db567d2d20fba16738afba94ef7bbb6 /Zotlabs/Lib/Activity.php
parentd65052c1ac29f5fa429f5337e95546d8edcb76d3 (diff)
downloadvolse-hubzilla-d45e8e4d20645d860aee033ec6dab4c7c433d609.tar.gz
volse-hubzilla-d45e8e4d20645d860aee033ec6dab4c7c433d609.tar.bz2
volse-hubzilla-d45e8e4d20645d860aee033ec6dab4c7c433d609.zip
make sure we have an array
Diffstat (limited to 'Zotlabs/Lib/Activity.php')
-rw-r--r--Zotlabs/Lib/Activity.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/Zotlabs/Lib/Activity.php b/Zotlabs/Lib/Activity.php
index e51922c86..464306c24 100644
--- a/Zotlabs/Lib/Activity.php
+++ b/Zotlabs/Lib/Activity.php
@@ -608,10 +608,10 @@ class Activity {
$ptr = [$ptr];
}
foreach ($ptr as $t) {
- if (!array_key_exists('type', $t))
+ if (is_array($t) && !array_key_exists('type', $t))
$t['type'] = 'Hashtag';
- if (array_key_exists('href', $t) && array_key_exists('name', $t)) {
+ if (is_array($t) && array_key_exists('href', $t) && array_key_exists('name', $t)) {
switch ($t['type']) {
case 'Hashtag':
$ret[] = ['ttype' => TERM_HASHTAG, 'url' => $t['href'], 'term' => escape_tags((substr($t['name'], 0, 1) === '#') ? substr($t['name'], 1) : $t['name'])];