From c80e7d7106a7835e8cddf40d8e1d2a61bebb760e Mon Sep 17 00:00:00 2001
From: Vidar Langseid
Date: Tue, 5 Nov 2024 12:07:00 +0100
Subject: [PATCH] Apply suggestions from code review
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Co-authored-by: Paweł Niedzielski
---
.../MVC/Symfony/Controller/Content/PreviewController.php | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/lib/MVC/Symfony/Controller/Content/PreviewController.php b/src/lib/MVC/Symfony/Controller/Content/PreviewController.php
index a54454ebd5..7e208f497b 100644
--- a/src/lib/MVC/Symfony/Controller/Content/PreviewController.php
+++ b/src/lib/MVC/Symfony/Controller/Content/PreviewController.php
@@ -71,7 +71,7 @@ public function __construct(
AuthorizationCheckerInterface $authorizationChecker,
PreviewLocationProvider $locationProvider,
CustomLocationControllerChecker $controllerChecker,
- bool $debugMode,
+ bool $debugMode = false,
?LoggerInterface $logger = null
) {
$this->contentService = $contentService;
@@ -212,9 +212,9 @@ private function buildResponseForGenericPreviewError(Location $location, Content
try {
if ($location->isDraft() && $this->controllerChecker->usesCustomController($content, $location)) {
$message = <<The view that rendered this location draft uses a custom controller, and resulted in a fatal error.
-Location View is deprecated, as it causes issues with preview, such as an empty location id when previewing the first version of a content.
-EOF;
+ The view that rendered this location draft uses a custom controller, and resulted in a fatal error.
+ Location View is deprecated, as it causes issues with preview, such as an empty location id when previewing the first version of a content.
+ EOF;
}
} catch (Exception $innerException) {
$message = 'An exception occurred when handling page preview exception';