Skip to content

Commit

Permalink
Revert "[BUGFIX] Fix for $documentArray being null after function…
Browse files Browse the repository at this point in the history
… `getDocumentById` is called (#1345)"

This reverts commit fdc2975.
  • Loading branch information
sebastian-meyer committed Oct 10, 2024
1 parent c9bb703 commit 372ad45
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions Classes/Controller/AbstractController.php
Original file line number Diff line number Diff line change
Expand Up @@ -512,14 +512,11 @@ protected function buildSimplePagination(PaginationInterface $pagination, Pagina
*/
private function getDocumentByUid(int $documentId)
{
// TODO: implement multiView as it is in getDocumentByUrl
$doc = null;
$this->document = $this->documentRepository->findOneByIdAndSettings($documentId);

if ($this->document) {
$doc = AbstractDocument::getInstance($this->document->getLocation(), $this->settings, true);
// fix for count(): Argument #1 ($value) must be of type Countable|array, null given
$this->documentArray[] = $doc;
} else {
$this->logger->error('Invalid UID "' . $documentId . '" or PID "' . $this->settings['storagePid'] . '" for document loading');
}
Expand Down

0 comments on commit 372ad45

Please sign in to comment.