Steps to reproduce:
- Throw an exception.
dispatch:beforeException-> handle exception,
return false, now the app flow returns to
possibleResponse === NULLand
implicitView === true(default).
falseand was not a Response object, so eventually this gets executed on line 399
response->setContent(view->getContent())and wipes out any reponse I have previously set.
- App returns to
$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.