Skip to content

Commit

Permalink
Merge pull request #43456 from nextcloud/backport/43435/stable28
Browse files Browse the repository at this point in the history
[stable28] do not break personal settings page is viewer is not there
  • Loading branch information
susnux authored Feb 9, 2024
2 parents 7daddb0 + 257b4fb commit 57c72f8
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions apps/settings/lib/Settings/Personal/ServerDevNotice.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,11 @@ public function getForm(): TemplateResponse {

$hasInitialState = false;

// viewer is default enabled and this makes a zero-cost assertion for Psalm
assert(class_exists(LoadViewer::class));

// If the Reasons to use Nextcloud.pdf file is here, let's init Viewer
if ($userFolder->nodeExists('Reasons to use Nextcloud.pdf')) {
// If the Reasons to use Nextcloud.pdf file is here, let's init Viewer, also check that Viewer is there
if (class_exists(LoadViewer::class) && $userFolder->nodeExists('Reasons to use Nextcloud.pdf')) {
/**
* @psalm-suppress UndefinedClass, InvalidArgument
*/
$this->eventDispatcher->dispatch(LoadViewer::class, new LoadViewer());
$hasInitialState = true;
}
Expand Down

0 comments on commit 57c72f8

Please sign in to comment.