diff options
author | Simon L <szaimen@e.mail.de> | 2024-02-08 14:39:18 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-08 14:39:18 +0100 |
commit | ca5f7adebc671b9e18ecdba0afda62fc23a381e4 (patch) | |
tree | dee0c5dac9d7b61af68f0bbe01a77ca4956f3a8b /apps | |
parent | 8da9de9d6043bd80cdba7a8c5b1df183046b69ee (diff) | |
parent | 686e2683ed5bf240eaf8ae711c0ec9bf802adb09 (diff) | |
download | nextcloud-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.php | 10 |
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; } |