Skip to content

Commit 03cac70

Browse files
committed
[BUGFIX] Fix warnings in DataHandlerHook
Fixes 2 PHP warnings that might occur in DataHandlerHook: - Undefined array key "columnsOverrides" - Undefined array key "tx_spreadsheets_assets" Resolves: hoogi91#603
1 parent 42bb363 commit 03cac70

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Classes/Hooks/DataHandlerHook.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public function __construct(
4040

4141
foreach ($GLOBALS['TCA'][$table]['types'] as $CType => $type) {
4242
$CType = (string)$CType;
43-
foreach ($type['columnsOverrides'] as $column => $conf) {
43+
foreach ($type['columnsOverrides'] ?? [] as $column => $conf) {
4444
if (
4545
isset($conf['config']['renderType'], $conf['config']['uploadField'])
4646
&& $conf['config']['renderType'] === 'spreadsheetInput'
@@ -81,7 +81,7 @@ public function processDatamap_afterDatabaseOperations( // @codingStandardsIgnor
8181
$activationConfig = $this->activationTypes[$table][$CType] ?? $this->activationTypes[$table]['*'];
8282
foreach ($activationConfig as $uploadField => $renderFields) {
8383
// truncate render fields after update if assets have been removed
84-
if ($fieldArray[$uploadField] === 0) {
84+
if (($fieldArray[$uploadField] ?? 1) === 0) {
8585
if ($status === 'update') {
8686
$this->connectionPool
8787
->getConnectionForTable($table)

0 commit comments

Comments
 (0)