Skip to content

Commit

Permalink
[BUGFIX] Use correct check for disabled field in DataHandler
Browse files Browse the repository at this point in the history
Instead of checking for the array key `enablecolumns` the check must be
done on the field `disabled` itself.

Resolves: #97728
Releases: main, 11.5
Change-Id: I411b37d4d63eb1ad52592cd887a95c2552ab7bfa
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/74762
Tested-by: core-ci <typo3@b13.com>
Tested-by: Stefan Bürk <stefan@buerk.tech>
Reviewed-by: Stefan Bürk <stefan@buerk.tech>
  • Loading branch information
georgringer authored and sbuerk committed Jun 3, 2022
1 parent 157930d commit 9a24139
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion typo3/sysext/core/Classes/DataHandling/DataHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -3272,7 +3272,7 @@ public function copyRecord($table, $uid, $destPid, $first = false, $overrideValu

// Initializing:
$theNewID = StringUtility::getUniqueId('NEW');
$enableField = isset($GLOBALS['TCA'][$table]['ctrl']['enablecolumns']) ? $GLOBALS['TCA'][$table]['ctrl']['enablecolumns']['disabled'] : '';
$enableField = $GLOBALS['TCA'][$table]['ctrl']['enablecolumns']['disabled'] ?? '';
$headerField = $GLOBALS['TCA'][$table]['ctrl']['label'];
// Getting "copy-after" fields if applicable:
$copyAfterFields = $destPid < 0 ? $this->fixCopyAfterDuplFields($table, $uid, abs($destPid), false) : [];
Expand Down

0 comments on commit 9a24139

Please sign in to comment.