Fixing ExceptionRenderer initializing Controllers with no request set. #73

Closed
wants to merge 5 commits into
from

Projects

None yet

2 participants

@tPl0ch

Added check if Router::getRequest(false) is returning a CakeRequest or null in ExceptionRenderer::_getController(). Fixes 'call to undefined method here()' when having Exceptions raised without a request having been set to the Router in testsuite (i.e. when running DboMysql without db config 'test').
See http://cakephp.lighthouseapp.com/projects/42648/tickets/1678-cakephp-20-exceptionrendererphp-line-174.
Now the ErrorController will have a valid request object set so the call to $controller->request->here()
Fixes #1678 .

Thomas Ploch added some commits May 15, 2011
Thomas Ploch Added check if Router::getRequest(false) is returning a CakeRequest o…
…r null in ExceptionRenderer::_getController(). Fixes 'call to undefined method here()' when having Exceptions raised without valid request set to the Router in testsuite (i.e. undefined database config 'test'). Fixes #1678 .
c71a655
Thomas Ploch Merge branch '2.0' of https://github.com/cakephp/cakephp into 2.0-exc…
…eptionrenderer
f2da8df
Thomas Ploch Fixed wrong 'Errors' (was 'errors') viewPath passed into Error Contro…
…ller in ExceptionRenderer::_getController() after renaming of lib/Cake/Views/Errors
4f811f0
Thomas Ploch Fixed wrong 'Errors' (was 'errors') viewPath passed in CakeErrorContr…
…oller::__construct().
c2089a8
@markstory
CakePHP member

Another possible solution to this error is for the testsuite to have its own exception handler. I don't really know if we want to be using the applications exception handler for tests.

@tPl0ch

Yeah, but I think the case that an Exception is raised before the request is set to the Router could also happen in an app environment.

@markstory
CakePHP member

Thanks for the patches, I've merged the important change in, the changes to view paths had already been done.

@markstory markstory closed this May 17, 2011
@westernmagic westernmagic pushed a commit that referenced this pull request Jul 15, 2011
Divya Manian commented out handheld.css. Fixes #73 3b1b1b6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment