Steps to reproduce:
- Throw an exception.
dispatch:beforeException
-> handle exception,response->setContent()
,return false
, now the app flow returns toapplication.zep
.application.zep
-> nowpossibleResponse === NULL
andimplicitView === true
(default).application.zep
->possibleResponse
was notfalse
and was not a Response object, so eventually this gets executed on line 399response->setContent(view->getContent())
and wipes out any reponse I have previously set.- App returns to
index.php
->$response = $application->handle(); $response->send();
the Response is now empty, because it was cleared in step 4.
Perhaps handle returning a response object from dispatch:beforeException
? Because currently Phalcon is clearing a response when it IMO shouldn't.
Unless there is a way to circumvent this behavior? The only one I can think of would be to $application->useImplicitView(false)
, but I don't want to do that since I use views in my app.