summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorFerdinand Thiessen <opensource@fthiessen.de>2024-02-09 01:47:55 +0100
committerGitHub <noreply@github.com>2024-02-09 01:47:55 +0100
commit57c72f830bf134cbb850dde401ef9397db30360c (patch)
tree42f0f762d8a5d2d7a8021baf9752395497801fb2 /apps
parent7daddb0f8c4a1cc46e27db6d42959f2156c02b92 (diff)
parent257b4fb683f9ae933523b7ae156dc6796fd7104e (diff)
downloadnextcloud-server-57c72f830bf134cbb850dde401ef9397db30360c.tar.gz
nextcloud-server-57c72f830bf134cbb850dde401ef9397db30360c.zip
Merge pull request #43456 from nextcloud/backport/43435/stable28
[stable28] do not break personal settings page is viewer is not there
Diffstat (limited to 'apps')
-rw-r--r--apps/settings/lib/Settings/Personal/ServerDevNotice.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/apps/settings/lib/Settings/Personal/ServerDevNotice.php b/apps/settings/lib/Settings/Personal/ServerDevNotice.php
index 8d6b0743127..8ff68b4063f 100644
--- a/apps/settings/lib/Settings/Personal/ServerDevNotice.php
+++ b/apps/settings/lib/Settings/Personal/ServerDevNotice.php
@@ -78,11 +78,11 @@ class ServerDevNotice implements ISettings {
$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;
}