-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Better capabilities surrounding console notFoundAction #3254
Better capabilities surrounding console notFoundAction #3254
Conversation
- Return a console response for non-HTTP response types; resolves comment noted in zendframework#3186
$response->setStatusCode(404); | ||
$viewModel = $this->createHttpNotFoundModel($response); | ||
} | ||
if (!$response instanceof HttpResponse) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be } else {
@weierophinney @akrabat this fix triggers yet another error on any console request: PHP Catchable fatal error: Argument 1 passed to Zend\Mvc\ResponseSender\ConsoleResponseSender::sendContent() must be an instance of Zend\Mvc\ResponseSender\SendResponseEvent, instance of Zend\Console\Response given, called in library/Zend/Mvc/ResponseSender/ConsoleResponseSender.php on line 49 and defined in library/Zend/Mvc/ResponseSender/ConsoleResponseSender.php on line 28 |
One note: the issue @H3DAZ brings up is only true when routing via the console to actions that do not exist; I'm using console actions with current master fine with no issues. |
@weierophinney although on develop this bug seems to be on every action existing or not. Fixed with PR #3263 |
I get the same error as H3DAZ without any routers and simply using the console banner to test the console |
in Dispatching to a good controller but wrong action triggers a Fatal Error #3186