diff options
author | Morris Jobke <hey@morrisjobke.de> | 2020-09-07 20:41:49 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-07 20:41:49 +0200 |
commit | 0e6344f5438f019b9d1da89f853ce82270464ba3 (patch) | |
tree | 86e4938da80e8fcc8915e3fa910af5245b6c83d5 /apps/settings | |
parent | 6f4ea73e0ce149a6bab6d897d0beb6e88b0886dc (diff) | |
parent | ce1e873a0a16cb756c5edfdbd4488b7f6cf9bbb7 (diff) | |
download | nextcloud-server-0e6344f5438f019b9d1da89f853ce82270464ba3.tar.gz nextcloud-server-0e6344f5438f019b9d1da89f853ce82270464ba3.zip |
Merge pull request #22650 from nextcloud/fix/noid/fix-psalm-warning
Only load viewer in settings if the viewer app is enabled
Diffstat (limited to 'apps/settings')
-rw-r--r-- | apps/settings/lib/Settings/Personal/ServerDevNotice.php | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/apps/settings/lib/Settings/Personal/ServerDevNotice.php b/apps/settings/lib/Settings/Personal/ServerDevNotice.php index 89c14ab722a..05f2c1342f4 100644 --- a/apps/settings/lib/Settings/Personal/ServerDevNotice.php +++ b/apps/settings/lib/Settings/Personal/ServerDevNotice.php @@ -78,6 +78,9 @@ 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')) { $this->eventDispatcher->dispatch(LoadViewer::class, new LoadViewer()); |