Browse Source

Call parent::__construct so helpers are available.

mark_story 14 years ago
parent
commit
cff980b45d
1 changed files with 1 additions and 3 deletions
  1. 1 3
      lib/Cake/View/JsonView.php

+ 1 - 3
lib/Cake/View/JsonView.php

@@ -62,10 +62,8 @@ class JsonView extends View {
  * @param Controller $controller
  */
 	public function __construct($controller) {
+		parent::__construct($controller);
 		if (is_object($controller)) {
-			foreach (array('viewVars', 'viewPath', 'view', 'response') as $var) {
-				$this->{$var} = $controller->{$var};
-			}
 			$this->response->type('json');
 		}
 	}