From 6d7e506c4a8b4389d74a8e8ffb7623b90accc9b0 Mon Sep 17 00:00:00 2001 From: Thomas Hohn <tho@gyldendal.dk> Date: Fri, 24 Mar 2023 13:08:57 +0100 Subject: [PATCH] [BUGFIX] Fix PHP 8 warning in AbstractXmlSitemapDataProvider MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added a null coalescing operator around the access $item['lastMod']. Resolves: #100280 Releases: main, 11.5 Change-Id: Idd4de6d647198e10d87ec01d64fa685535ab59aa Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/78066 Tested-by: core-ci <typo3@b13.com> Tested-by: Stefan Bürk <stefan@buerk.tech> Reviewed-by: Stefan Bürk <stefan@buerk.tech> --- .../seo/Classes/XmlSitemap/AbstractXmlSitemapDataProvider.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/typo3/sysext/seo/Classes/XmlSitemap/AbstractXmlSitemapDataProvider.php b/typo3/sysext/seo/Classes/XmlSitemap/AbstractXmlSitemapDataProvider.php index 42e9f7b3ea03..738e12a3467c 100644 --- a/typo3/sysext/seo/Classes/XmlSitemap/AbstractXmlSitemapDataProvider.php +++ b/typo3/sysext/seo/Classes/XmlSitemap/AbstractXmlSitemapDataProvider.php @@ -104,7 +104,7 @@ abstract class AbstractXmlSitemapDataProvider implements XmlSitemapDataProviderI { $lastMod = 0; foreach ($this->items as $item) { - if ((int)$item['lastMod'] > $lastMod) { + if ((int)($item['lastMod'] ?? 0) > $lastMod) { $lastMod = (int)$item['lastMod']; } } -- GitLab