]> source.dussan.org Git - nextcloud-server.git/commitdiff
do not break personal settings page is viewer is not there
authorSimon L <szaimen@e.mail.de>
Wed, 7 Feb 2024 13:29:22 +0000 (14:29 +0100)
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>
Thu, 8 Feb 2024 13:39:48 +0000 (13:39 +0000)
Signed-off-by: Simon L <szaimen@e.mail.de>
apps/settings/lib/Settings/Personal/ServerDevNotice.php

index 3cb9a3a972fb2f65445728afb84059c8df51eaf4..8e08b2c8c7f3d9f709c020bb0e8ee908473b4a78 100644 (file)
@@ -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;
                }