Skip to content

Commit

Permalink
[BUGFIX] Fix PHP 8 warning in AbstractXmlSitemapDataProvider
Browse files Browse the repository at this point in the history
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/+/78241
Reviewed-by: Oliver Klee <typo3-coding@oliverklee.de>
Reviewed-by: Torben Hansen <derhansen@gmail.com>
Tested-by: core-ci <typo3@b13.com>
Reviewed-by: Nikita Hovratov <nikita.h@live.de>
Tested-by: Stefan Bürk <stefan@buerk.tech>
Reviewed-by: Guido Schmechel <guido.schmechel@brandung.de>
Reviewed-by: Stefan Bürk <stefan@buerk.tech>
Tested-by: Nikita Hovratov <nikita.h@live.de>
  • Loading branch information
thomashohn authored and sbuerk committed Mar 26, 2023
1 parent e42b158 commit 7736746
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -55,7 +55,7 @@ public function getLastModified(): int
{
$lastMod = 0;
foreach ($this->items as $item) {
if ((int)$item['lastMod'] > $lastMod) {
if ((int)($item['lastMod'] ?? 0) > $lastMod) {
$lastMod = (int)$item['lastMod'];
}
}
Expand Down

0 comments on commit 7736746

Please sign in to comment.