Skip to content

Commit

Permalink
Whoops vermeiden - Call to a member function getFileName() on null
Browse files Browse the repository at this point in the history
  • Loading branch information
tbaddade committed Jun 20, 2023
1 parent e10cd33 commit ad9d8ff
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/yrewrite/seo.php
Original file line number Diff line number Diff line change
Expand Up @@ -311,8 +311,8 @@ public function sendSitemap($domain = '')
"\n".'<url>'.
"\n\t".'<loc>'.rex_yrewrite::getFullPath($path[$clang_id]).'</loc>'.
"\n\t".'<lastmod>'.date(DATE_W3C, $article->getUpdateDate()).'</lastmod>'; // Serverzeitzone passt
if ($article->getValue(self::$meta_image_field)) {
$media = rex_media::get((string) $article->getValue(self::$meta_image_field));
$media = rex_media::get((string) $article->getValue(self::$meta_image_field));
if ($media) {
$sitemap_entry .= "\n\t".'<image:image>'.
"\n\t\t".'<image:loc>'.rtrim(rex_yrewrite::getDomainByArticleId($article->getId())->getUrl(), '/').rex_media_manager::getUrl('yrewrite_seo_image', $media->getFileName()).'</image:loc>'.
($media->getTitle() ? "\n\t\t".'<image:title>'.rex_escape($media->getTitle()).'</image:title>' : '').
Expand Down

0 comments on commit ad9d8ff

Please sign in to comment.