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

Fix Cms/Classes not found when CMS module isn't loaded in config/cms.php #45

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

AdrienAdB
Copy link

@AdrienAdB AdrienAdB commented Jul 2, 2023

Fix #43
Cms/Classes not found when CMS module isn't loaded in config/cms.php

@AdrienAdB AdrienAdB changed the title fix #43 Fix Cms/Classes not found when CMS module isn't loaded in config/cms.php (Issue #43) Jul 2, 2023
@AdrienAdB AdrienAdB changed the title Fix Cms/Classes not found when CMS module isn't loaded in config/cms.php (Issue #43) Fix Cms/Classes not found when CMS module isn't loaded in config/cms.php Jul 2, 2023
Comment on lines +111 to +113
if (!class_exists(CmsPage::class)) {
return $result;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AdrienAdB you can probably drop the second class existence checks - if the Theme class is there, it's pretty much a given that the CmsPage class will also be there.

Suggested change
if (!class_exists(CmsPage::class)) {
return $result;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incompatibility when module CMS is disabled. (Cms\Classes not found)
2 participants