Closed tigerchick closed 1 month ago
The error message + stack trace is showing that plugins/passwordy/src/Plugin.php
is attempting to call Craft::$app->request->isPost
on line 102. However isPost
is only available for web requests, when Craft::$app->request
is an instance of craft\web\Request
. On console requests, it will be an instance of craft\console\Request
.
Not sure what your code looks like exactly there, but you can fix by first making sure it’s not a console request by calling Craft::$app->request->isConsoleRequest
.
Thanks @brandonkelly for showing me the right direction! Much appreciated.
Description
After having used generator to scaffold a plugin (within which everything appears to work as intended) I then needed to build another new plugin; leading me to notice that craft console is broken.
It throws the following exception when I try to run any craft command (eg php craft)
I have no idea how to start fixing this so any help appreciated!
Edit: I tried running: composer dump-autoload It hasn't fixed it though.
Additional info