From 89c4dd9d8f268341f64d57840c2060fd7d94a575 Mon Sep 17 00:00:00 2001 From: Michael Kubina Date: Wed, 18 Dec 2024 08:44:58 +0100 Subject: [PATCH] [BUGFIX] Use the document cache in `getDocumentByUid()` (#1405) Co-authored-by: Michael Kubina Co-authored-by: Sebastian Meyer --- Classes/Controller/AbstractController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Classes/Controller/AbstractController.php b/Classes/Controller/AbstractController.php index 8ae3c4f5d..f1f5112f9 100644 --- a/Classes/Controller/AbstractController.php +++ b/Classes/Controller/AbstractController.php @@ -548,7 +548,7 @@ private function getDocumentByUid(int $documentId) $this->document = $this->documentRepository->findOneByIdAndSettings($documentId); if ($this->document) { - $doc = AbstractDocument::getInstance($this->document->getLocation(), $this->settings, true); + $doc = AbstractDocument::getInstance($this->document->getLocation(), $this->settings, false); // fix for count(): Argument #1 ($value) must be of type Countable|array, null given $this->documentArray[] = $doc; } else {