Skip to content

Commit

Permalink
[BUGFIX] Provide a fallback for null values
Browse files Browse the repository at this point in the history
There might be situation, where the `explicit_allowdeny` column
is null. (Probably very old installations, where the column had null
as default. Providing an empty string as a fallback solves the issue.

Related: #1062
Related: #1019
Signed-off-by: Marcus Schwemer <marcus.schwemer@in2code.de>
  • Loading branch information
mschwemer committed Jul 5, 2024
1 parent 7749dba commit 7a9f9b1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Classes/Update/PowermailPermissionUpdater.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ protected function updateRow(array $row): void
'tt_content:list_type:powermail_pi1' => $pi1Replacement,
];

$newList = str_replace(array_keys($searchReplace), array_values($searchReplace), $row['explicit_allowdeny']);
$newList = str_replace(array_keys($searchReplace), array_values($searchReplace), $row['explicit_allowdeny'] ?? '');
$queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('be_groups');
$queryBuilder->update('be_groups')
->set('explicit_allowdeny', $newList)
Expand Down

0 comments on commit 7a9f9b1

Please sign in to comment.