Fix for Renderer::_render() with no set $request property. #624

Closed
wants to merge 1 commit into
from

3 participants

@mikegreiling

Quick fix in the renderer class for instances when $_request is null. I encountered this when attaching my own error handler method which was not attached to Dispatch::run() as the example error handler is, and thus the request object was not available.

My error template called $this->_render() to include a template element and this raised an ErrorException "Trying to get property of non-object in [...]/Projects/Lithium/dev/li3_core/libraries/lithium/template/view/Renderer.php on line 490";

@travisbot

This pull request passes (merged 6387beb into c3419a4).

@nateabele
Union of RAD member

Looks good. Once we get a test case and this is submitted against the dev branch, we'll get it merged in.

@nateabele
Union of RAD member

Merged to dev in 51d1770

@nateabele nateabele closed this Sep 13, 2012
@mikegreiling

sorry, got a little busy. I see this had been merged now, do you still need a test case for this?

@nateabele
Union of RAD member

No, it's fine. @mehlah is actually rewriting the affected code not to rely on $_request.

@mehlah mehlah referenced this pull request Sep 16, 2012
Closed

Renderer options #642

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment