mirror of
https://framagit.org/hubzilla/core.git
synced 2026-06-21 00:52:33 -04:00
make sure we have an array
This commit is contained in:
@@ -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'])];
|
||||
|
||||
Reference in New Issue
Block a user