Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Adding an isset so a non-existant view isn't accessed.

Fixes #1954
  • Loading branch information...
commit 36eca679feecc2f940f8cf70e712d4f59bd383b5 1 parent 4d1f41d
@markstory markstory authored
Showing with 4 additions and 2 deletions.
  1. +4 −2 lib/Cake/TestSuite/ControllerTestCase.php
View
6 lib/Cake/TestSuite/ControllerTestCase.php
@@ -229,8 +229,10 @@ protected function _testAction($url = '', $options = array()) {
$this->result = $Dispatch->dispatch($request, $Dispatch->response, $params);
$this->controller = $Dispatch->testController;
if ($options['return'] != 'result') {
- $this->vars = $this->controller->View->viewVars;
- $this->view = $this->controller->View->_viewNoLayout;
+ if (isset($this->controller->View)) {
+ $this->vars = $this->controller->View->viewVars;
+ $this->view = $this->controller->View->_viewNoLayout;
+ }
$this->contents = $this->controller->response->body();
}
$this->headers = $Dispatch->response->header();
Please sign in to comment.
Something went wrong with that request. Please try again.