Open rtrudel opened 5 years ago
I may have found the problem:
I replaced:
Craft::$app->on(Application::EVENT_INIT, function (Event $event) {
with
use yii\base\Event;
...
Event::on(CraftVariable::class, CraftVariable::EVENT_INIT, function(Event $event) {
I believe it's almost the same but it seems to work.
Can be avoided if you enclose the event in something like this:
if(Craft::$app instanceof craft\web\Application)
Describe the bug When I re-serve my Craft app, I get this error:
To Reproduce Steps to reproduce the behavior:
./craft serve
)./craft serve
)Expected behavior Craft running on serve.
Desktop (please complete the following information):