Fatal error after fresh install Sage 10 & Acorn 3.2

A fresh install of sage and acorn results in:
Fatal error: Uncaught Error: Call to a member function boot() on null in .../functions.php on line *43*

This is line 43:
\Roots\bootloader()->boot();

How could \Roots\bootloader() be null?
Could it be the latest Acorn update?

Site running on local, PHP 8.1

The bootloader() function in Sage:

This uses getInstance to get an instance of the Bootloader (singleton):
https://github.com/roots/acorn/blob/da254a5b77127f741003c6956db11f9c5a1493e6/src/Roots/Acorn/Bootloader.php#L59

So either an existing instance is returned, or a new one is created:

return static::$instance ??= new static($app);

But why it ends up null in your case is strange. Can you add debug breakpoints or just output at some of these places so you know at what point null is returned?

1 Like

Thanks for your response.
I just found the problem… The plugins and mu-plugins folder were copied from an other project and I just saw that there was a older Acorn version included as a mu-plugin …, that caused the conflict. :see_no_evil:
Sorry to bother you and thanks for your help.

2 Likes