Skip to content

Commit

Permalink
[BUGFIX] Document type switch throws error if no document is set (kit…
Browse files Browse the repository at this point in the history
…odo#1310)

Co-authored-by: Bernd Fallert <[email protected]>
  • Loading branch information
2 people authored and sebastian-meyer committed Aug 23, 2024
1 parent a7cb263 commit 0d2290c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Classes/ExpressionLanguage/DocumentTypeFunctionProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public function injectConfigurationManager(ConfigurationManager $configurationMa
* @var DocumentRepository
*/
protected $documentRepository;

/**
* @param DocumentRepository $documentRepository
*/
Expand Down Expand Up @@ -134,6 +134,11 @@ function($arguments, $cPid)
return $type;
}

// 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 ($this->document === null || $this->document->getCurrentDocument() === null) {
Expand Down

0 comments on commit 0d2290c

Please sign in to comment.