summaryrefslogtreecommitdiffstats
path: root/apps/settings
diff options
context:
space:
mode:
authorSimon L <szaimen@e.mail.de>2024-02-07 14:29:22 +0100
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>2024-02-08 13:39:48 +0000
commitc5cb2e86e3887d223bedc7ea7d5052eab518bde8 (patch)
tree492fd01810226a4f1c1e0ac14e3aca1acd112bfd /apps/settings
parentcd15c30619d12e6161f9c8e6c1fd70be82324686 (diff)
downloadnextcloud-server-c5cb2e86e3887d223bedc7ea7d5052eab518bde8.tar.gz
nextcloud-server-c5cb2e86e3887d223bedc7ea7d5052eab518bde8.zip
do not break personal settings page is viewer is not there
Signed-off-by: Simon L <szaimen@e.mail.de>
Diffstat (limited to 'apps/settings')
-rw-r--r--apps/settings/lib/Settings/Personal/ServerDevNotice.php7
1 files changed, 2 insertions, 5 deletions
diff --git a/apps/settings/lib/Settings/Personal/ServerDevNotice.php b/apps/settings/lib/Settings/Personal/ServerDevNotice.php
index 3cb9a3a972f..8e08b2c8c7f 100644
--- a/apps/settings/lib/Settings/Personal/ServerDevNotice.php
+++ b/apps/settings/lib/Settings/Personal/ServerDevNotice.php
@@ -78,11 +78,8 @@ 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')) {
$this->eventDispatcher->dispatch(LoadViewer::class, new LoadViewer());
$hasInitialState = true;
}