Skip to content

Commit

Permalink
[BUGFIX] Document type switch throws error if no document is set (#1310)
Browse files Browse the repository at this point in the history
Co-authored-by: Bernd Fallert <[email protected]>
  • Loading branch information
BFallert and Bernd Fallert authored Aug 21, 2024
1 parent b27a1d0 commit e6061d5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Classes/ExpressionLanguage/DocumentTypeFunctionProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,11 @@ function($arguments, $cPid)
return 'object';
}

// It happens that $queryParams does not contain a key 'tx_dlf[id]'
if (!isset($queryParams['tx_dlf']['id'])) {
return $type;
}

// Load document with current plugin parameters.
$this->loadDocument($queryParams['tx_dlf'], $cPid);
if (!isset($this->document) || $this->document->getCurrentDocument() === null) {
Expand Down

0 comments on commit e6061d5

Please sign in to comment.