aboutsummaryrefslogtreecommitdiffstats
path: root/apps/settings/lib/Settings
diff options
context:
space:
mode:
authorSimon L <szaimen@e.mail.de>2024-02-07 14:29:22 +0100
committerSimon L <szaimen@e.mail.de>2024-02-07 14:29:22 +0100
commitb0c57ed65fe419674ce8eaf080996f3a96833263 (patch)
tree9f714663fbafa34fc0daea5c846e7b1ea3862975 /apps/settings/lib/Settings
parented3a1e753853fd4ec8d4187ca8af70e613c07487 (diff)
downloadnextcloud-server-b0c57ed65fe419674ce8eaf080996f3a96833263.tar.gz
nextcloud-server-b0c57ed65fe419674ce8eaf080996f3a96833263.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/lib/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 8d6b0743127..5d31eda65d2 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;
}