aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorSimon L <szaimen@e.mail.de>2024-02-08 14:39:18 +0100
committerGitHub <noreply@github.com>2024-02-08 14:39:18 +0100
commitca5f7adebc671b9e18ecdba0afda62fc23a381e4 (patch)
treedee0c5dac9d7b61af68f0bbe01a77ca4956f3a8b /apps
parent8da9de9d6043bd80cdba7a8c5b1df183046b69ee (diff)
parent686e2683ed5bf240eaf8ae711c0ec9bf802adb09 (diff)
downloadnextcloud-server-ca5f7adebc671b9e18ecdba0afda62fc23a381e4.tar.gz
nextcloud-server-ca5f7adebc671b9e18ecdba0afda62fc23a381e4.zip
Merge pull request #43435 from nextcloud/enh/noid/do-not-break-personal-settings-without-viewer
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;
}