We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d71164c commit 9291560Copy full SHA for 9291560
src/Cms.php
@@ -22,7 +22,7 @@
22
23
public static function config(): GeneralConfig
24
{
25
- return app(GeneralConfig::class);
+ return app(GeneralConfig::class) ?? GeneralConfig::create();
26
}
27
28
public static function systemName(): string
yii2-adapter/src/Yii2ServiceProvider.php
@@ -353,9 +353,13 @@ public function boot(): void
353
));
354
355
/**
356
- * Load Craft
+ * Load Craft when necessary
357
*/
358
- app('Craft');
+ spl_autoload_register(function($class) {
359
+ if ($class === 'Craft') {
360
+ app('Craft');
361
+ }
362
+ });
363
364
$this->ensureNewMigrationTable();
365
0 commit comments