- empty() is maybe superflous here, still I would prefer a code style that is
  written explicitly and not rely on "magic casting"
This commit is contained in:
Roland Häder 2022-06-22 18:56:08 +02:00
parent 15d8341d9a
commit 7eefb9aed8
No known key found for this signature in database
GPG key ID: C82EDE5DDFA0BA77
4 changed files with 7 additions and 7 deletions

View file

@ -1377,7 +1377,7 @@ class OStatus
case 'photo':
if (!empty($siteinfo['image'])) {
$imgdata = Images::getInfoFromURLCached($siteinfo['image']);
if (!empty($imgdata)) {
if ($imgdata) {
$attributes = [
'rel' => 'enclosure',
'href' => $siteinfo['image'],
@ -1407,7 +1407,7 @@ class OStatus
if (!DI::config()->get('system', 'ostatus_not_attach_preview') && ($siteinfo['type'] != 'photo') && isset($siteinfo['image'])) {
$imgdata = Images::getInfoFromURLCached($siteinfo['image']);
if (!empty($imgdata)) {
if ($imgdata) {
$attributes = [
'rel' => 'enclosure',
'href' => $siteinfo['image'],