Skip to content
This repository has been archived by the owner on Jan 8, 2020. It is now read-only.

Better capabilities surrounding console notFoundAction #3254

Merged
merged 3 commits into from
Dec 19, 2012

Conversation

weierophinney
Copy link
Member

- 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) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be } else {

akrabat added a commit that referenced this pull request Dec 19, 2012
akrabat added a commit that referenced this pull request Dec 19, 2012
@akrabat akrabat merged commit bd5913c into zendframework:master Dec 19, 2012
@ghost ghost assigned akrabat Dec 19, 2012
@weierophinney weierophinney deleted the hotfix/console-404 branch December 19, 2012 20:53
@tca3
Copy link
Contributor

tca3 commented Dec 20, 2012

@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

@weierophinney
Copy link
Member Author

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.

@tca3
Copy link
Contributor

tca3 commented Dec 20, 2012

@weierophinney although on develop this bug seems to be on every action existing or not. Fixed with PR #3263

@nhaze
Copy link

nhaze commented Dec 22, 2012

I get the same error as H3DAZ without any routers and simply using the console banner to test the console

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants