Merge pull request #14430 from annando/warning

Fixes warning "Undefined array key "@type"
This commit is contained in:
Tobias Diekershoff 2024-09-10 22:25:20 +02:00 committed by GitHub
commit eb066b258d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -490,7 +490,7 @@ class APContact
{ {
$original = $name; $original = $name;
foreach ($tags as $tag) { foreach ($tags as $tag) {
if ($tag['@type'] != 'toot:Emoji') { if (empty($tag['@type']) || ($tag['@type'] != 'toot:Emoji')) {
continue; continue;
} }
$name = trim(str_replace($tag['as:name'], '', $name)); $name = trim(str_replace($tag['as:name'], '', $name));