Skip to content
Snippets Groups Projects
Commit 6d7e506c authored by Thomas Hohn's avatar Thomas Hohn Committed by Stefan Bürk
Browse files

[BUGFIX] Fix PHP 8 warning in AbstractXmlSitemapDataProvider

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: default avatarcore-ci <typo3@b13.com>
Tested-by: default avatarStefan Bürk <stefan@buerk.tech>
Reviewed-by: default avatarStefan Bürk <stefan@buerk.tech>
parent b59986fc
Branches
Tags
No related merge requests found
......@@ -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'];
}
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment