Skip to content
Snippets Groups Projects
Commit d7945c33 authored by Nikita Hovratov's avatar Nikita Hovratov Committed by Oliver Bartsch
Browse files

[BUGFIX] Fix counting of doktypes in DatabaseIntegrityCheck

The previous logic for checking whether a value for a specific
doktype already exists falsely assumed the value should be an
array. This is now fixed by using the null coalescing assignment,
which is available since PHP 7.4.

Resolves: #101196
Related: #94498
Releases: main, 12.4, 11.5
Change-Id: Iab1dba7987d336b08bfb4f398b16666d591daada
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/79564


Tested-by: default avatarBenni Mack <benni@typo3.org>
Tested-by: default avatarOliver Bartsch <bo@cedev.de>
Reviewed-by: default avatarBenni Mack <benni@typo3.org>
Tested-by: default avatarcore-ci <typo3@b13.com>
Reviewed-by: default avatarOliver Bartsch <bo@cedev.de>
parent 43862291
No related merge requests found
......@@ -154,10 +154,7 @@ class DatabaseIntegrityCheck
$this->recStats['hidden']++;
}
if (!is_array($this->recStats['doktype'][$row['doktype']] ?? false)) {
$this->recStats['doktype'][$row['doktype']] = 0;
}
$this->recStats['doktype'][$row['doktype']] ??= 0;
$this->recStats['doktype'][$row['doktype']]++;
// If all records should be shown, do so:
if ($this->genTreeIncludeRecords) {
......
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