diff options
author | Simon L <szaimen@e.mail.de> | 2024-02-09 12:28:06 +0100 |
---|---|---|
committer | Simon L <szaimen@e.mail.de> | 2024-02-09 12:28:06 +0100 |
commit | 9228adba73f5f0c6a8f391d7d0c49b960d1183ea (patch) | |
tree | e22e164b0cfe4296549b424c0f920c62f07e86f0 /apps | |
parent | 677e386aacdf970466ccbe0acbef055af3995dd3 (diff) | |
download | nextcloud-server-9228adba73f5f0c6a8f391d7d0c49b960d1183ea.tar.gz nextcloud-server-9228adba73f5f0c6a8f391d7d0c49b960d1183ea.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')
-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; } |