Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Paweł Niedzielski <pawel.niedzielski@ibexa.co>
  • Loading branch information
vidarl and Steveb-p committed Nov 18, 2024
1 parent 8d07f2b commit e8b703d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/lib/MVC/Symfony/Controller/Content/PreviewController.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public function __construct(
AuthorizationCheckerInterface $authorizationChecker,
PreviewLocationProvider $locationProvider,
CustomLocationControllerChecker $controllerChecker,
bool $debugMode,
bool $debugMode = false,
?LoggerInterface $logger = null
) {
$this->contentService = $contentService;
Expand Down Expand Up @@ -212,9 +212,9 @@ private function buildResponseForGenericPreviewError(Location $location, Content
try {
if ($location->isDraft() && $this->controllerChecker->usesCustomController($content, $location)) {
$message = <<<EOF
<p>The view that rendered this location draft uses a custom controller, and resulted in a fatal error.</p>
<p>Location View is deprecated, as it causes issues with preview, such as an empty location id when previewing the first version of a content.</p>
EOF;
<p>The view that rendered this location draft uses a custom controller, and resulted in a fatal error.</p>
<p>Location View is deprecated, as it causes issues with preview, such as an empty location id when previewing the first version of a content.</p>
EOF;
}
} catch (Exception $innerException) {
$message = 'An exception occurred when handling page preview exception';
Expand Down

0 comments on commit e8b703d

Please sign in to comment.