Skip to content

Commit

Permalink
起動時、利用可能なテーマを取得する際に判定を追加
Browse files Browse the repository at this point in the history
CakePHP5.1 系では、CorePlugin::path() を利用する際、プラグインをその時点でロードしてしまうため
  • Loading branch information
ryuring committed Dec 20, 2024
1 parent d0dba2d commit 389f345
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/baser-core/src/BaserCorePlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ public function getAvailableThemes(): array
$themes = [];
foreach($sites as $site) {
if ($site->theme) {
if (!is_dir(CorePlugin::path($site->theme))) continue;
if (!CorePlugin::isLoaded($site->theme) || !is_dir(CorePlugin::path($site->theme))) continue;
if(in_array($site->theme, $themes)) continue;
$themes[] = $site->theme;
}
Expand Down

0 comments on commit 389f345

Please sign in to comment.