提问前请务必仔细阅读如何排查故障和常见问题。
问题描述:
启用一款主题后网页报错
报错内容:
Flarum encountered a boot error (Error)
Cannot use object of type Flarum\Foundation\Application as array
thrown in /www/wwwroot/bbs.itxy.tech/vendor/the-turk/flarum-stargazing-theme/extend.php on line 34
Error: Cannot use object of type Flarum\Foundation\Application as array in /www/wwwroot/bbs.itxy.tech/vendor/the-turk/flarum-stargazing-theme/extend.php:34
Stack trace:
#0 /www/wwwroot/bbs.itxy.tech/vendor/illuminate/container/BoundMethod.php(36): Flarum\Extension\Extension->TheTurk\Stargazing{closure}(Object(Flarum\Foundation\Application))
#1 /www/wwwroot/bbs.itxy.tech/vendor/illuminate/container/Util.php(37): Illuminate\Container\BoundMethod::Illuminate\Container{closure}()
#2 /www/wwwroot/bbs.itxy.tech/vendor/illuminate/container/BoundMethod.php(81): Illuminate\Container\Util::unwrapIfClosure(Object(Closure))
#3 /www/wwwroot/bbs.itxy.tech/vendor/illuminate/container/BoundMethod.php(37): Illuminate\Container\BoundMethod::callBoundMethod(Object(Illuminate\Container\Container), Object(Closure), Object(Closure))
#4 /www/wwwroot/bbs.itxy.tech/vendor/illuminate/container/Container.php(590): Illuminate\Container\BoundMethod::call(Object(Illuminate\Container\Container), Object(Closure), Array, NULL)
#5 /www/wwwroot/bbs.itxy.tech/vendor/flarum/core/src/Extend/Compat.php(35): Illuminate\Container\Container->call(Object(Closure))
#6 /www/wwwroot/bbs.itxy.tech/vendor/flarum/core/src/Extension/Extension.php(137): Flarum\Extend\Compat->extend(Object(Illuminate\Container\Container), Object(Flarum\Extension\Extension))
#7 /www/wwwroot/bbs.itxy.tech/vendor/flarum/core/src/Extension/ExtensionManager.php(334): Flarum\Extension\Extension->extend(Object(Illuminate\Container\Container))
#8 /www/wwwroot/bbs.itxy.tech/vendor/flarum/core/src/Extension/ExtensionServiceProvider.php(30): Flarum\Extension\ExtensionManager->extend(Object(Illuminate\Container\Container))
#9 [internal function]: Flarum\Extension\ExtensionServiceProvider->Flarum\Extension{closure}(Object(Flarum\Foundation\Application))
#10 /www/wwwroot/bbs.itxy.tech/vendor/flarum/core/src/Foundation/Application.php(322): call_user_func(Object(Closure), Object(Flarum\Foundation\Application))
#11 /www/wwwroot/bbs.itxy.tech/vendor/flarum/core/src/Foundation/Application.php(263): Flarum\Foundation\Application->fireAppCallbacks(Array)
#12 /www/wwwroot/bbs.itxy.tech/vendor/flarum/core/src/Foundation/InstalledSite.php(148): Flarum\Foundation\Application->boot()
#13 /www/wwwroot/bbs.itxy.tech/vendor/flarum/core/src/Foundation/InstalledSite.php(81): Flarum\Foundation\InstalledSite->bootLaravel()
#14 /www/wwwroot/bbs.itxy.tech/vendor/flarum/core/src/Http/Server.php(56): Flarum\Foundation\InstalledSite->bootApp()
#15 /www/wwwroot/bbs.itxy.tech/vendor/flarum/core/src/Http/Server.php(33): Flarum\Http\Server->safelyBootAndGetHandler()
#16 /www/wwwroot/bbs.itxy.tech/public/index.php(26): Flarum\Http\Server->listen()
#17 {main}
调试模式报错内容:
已尝试的解决办法:
网址: