Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

do not break personal settings page is viewer is not there #43435

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions apps/settings/lib/Settings/Personal/ServerDevNotice.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,9 @@

$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());

Check failure on line 83 in apps/settings/lib/Settings/Personal/ServerDevNotice.php

View workflow job for this annotation

GitHub Actions / static-code-analysis

UndefinedClass

apps/settings/lib/Settings/Personal/ServerDevNotice.php:83:37: UndefinedClass: Class, interface or enum named OCA\Viewer\Event\LoadViewer does not exist (see https://psalm.dev/019)

Check failure on line 83 in apps/settings/lib/Settings/Personal/ServerDevNotice.php

View workflow job for this annotation

GitHub Actions / static-code-analysis

UndefinedClass

apps/settings/lib/Settings/Personal/ServerDevNotice.php:83:60: UndefinedClass: Class, interface or enum named OCA\Viewer\Event\LoadViewer does not exist (see https://psalm.dev/019)
$hasInitialState = true;
}

Expand Down
Loading