Bug #97619
closedUndefined array key "_CURRENT_VERSION" in CleanFlexFormsCommand
100%
Description
After updating from TYPO3 10.4 to 11.5 my deployment script throw this exception when calling "vendor/bin/typo3 cleanup:flexform":
Warning: Undefined array key "_CURRENT_VERSION" in /..../private/typo3/sysext/lowlevel/Classes/Command/CleanFlexFormsCommand.php line 173
After debugging the mentions line 173, I found the cause in a condition, which is not PHP 8 compatible, because the array key doesn't exists in some cases:
if (!$verRec['_CURRENT_VERSION']) {
To fix this issue it can just be changed to the following, since the value of this key can only be "true" or not set (see previous BackendUtility::selectVersionsOfRecord method):
if (!isset($verRec['_CURRENT_VERSION'])) {
Updated by Gerrit Code Review over 2 years ago
- Status changed from New to Under Review
Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/74635
Updated by Gerrit Code Review over 2 years ago
Patch set 1 for branch 11.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/74617
Updated by Oliver Bartsch over 2 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset cf38735a4037fc365dcedc30e28f20a7944b70ba.
Updated by Daniel Siepmann about 2 years ago
- Related to Bug #98337: Undefined array key "_CURRENT_VERSION" in WorkspaceVersionRecordsCommand added
Updated by Daniel Siepmann about 2 years ago
- Related to Bug #98358: Undefined array key "exec" in ExtensionManagementUtility added
Updated by Daniel Siepmann about 2 years ago
- Related to Task #98321: Address "undefined array key" issues for PHP 8 added