mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Call parent::__construct so helpers are available.
This commit is contained in:
parent
6e1b1df2b2
commit
cff980b45d
1 changed files with 1 additions and 3 deletions
|
@ -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');
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue