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 c3c63e2 commit d9d6b20Copy full SHA for d9d6b20
src/Providers/AddonServiceProvider.php
@@ -728,7 +728,15 @@ protected function bootFieldsets()
728
729
protected function autoloadFilesFromFolder($folder, $requiredClass)
730
{
731
- $addon = $this->getAddon();
+ try {
732
+ $addon = $this->getAddon();
733
+ } catch (NotBootedException $e) {
734
+ // This would be thrown if a developer has tried to call a method
735
+ // that triggers autoloading before Statamic has booted. Perhaps
736
+ // they have placed it in the boot method instead of bootAddon.
737
+ return [];
738
+ }
739
+
740
$path = $addon->directory().$addon->autoload().'/'.$folder;
741
742
if (! $this->app['files']->exists($path)) {
0 commit comments