Skip to content

Commit

Permalink
[TASK] Ensure parentTable key is set before comparison
Browse files Browse the repository at this point in the history
Check for the existence of the 'parentTable' key
in the configuration array before comparing it.
This prevents potential undefined index errors.
  • Loading branch information
Christian Bülter committed Oct 30, 2024
1 parent 5c294ac commit 9708b76
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Classes/Service/AdditionalContentService.php
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ protected function getConfigs(string $cType, string $parentTable = ''): array
{
$configs = $this->processedAdditionalTableConfig[$cType] ?? $this->processedAdditionalTableConfig[$cType] ?? [];
foreach ($configs as $key => $config) {
if ($parentTable != '' && $config['parentTable'] !== $parentTable) {
if ($parentTable != '' && isset($config['parentTable']) && $config['parentTable'] !== $parentTable) {
unset($configs[$key]);
}
}
Expand Down

0 comments on commit 9708b76

Please sign in to comment.