mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 02:56:15 +00:00
Adding fix for Ticket #1219.
Checking for an object being passed. git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@3306 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
5549ddfd75
commit
0ae0905004
1 changed files with 20 additions and 18 deletions
|
@ -213,24 +213,26 @@ class View extends Object{
|
|||
* @return View
|
||||
*/
|
||||
function __construct(&$controller) {
|
||||
$this->controller =& $controller;
|
||||
$this->_viewVars = $this->controller->_viewVars;
|
||||
$this->action = $this->controller->action;
|
||||
$this->autoLayout = $this->controller->autoLayout;
|
||||
$this->autoRender = $this->controller->autoRender;
|
||||
$this->base = $this->controller->base;
|
||||
$this->webroot = $this->controller->webroot;
|
||||
$this->helpers = $this->controller->helpers;
|
||||
$this->here = $this->controller->here;
|
||||
$this->layout = $this->controller->layout;
|
||||
$this->modelNames = $this->controller->modelNames;
|
||||
$this->name = $this->controller->name;
|
||||
$this->pageTitle = $this->controller->pageTitle;
|
||||
$this->viewPath = $this->controller->viewPath;
|
||||
$this->params = $this->controller->params;
|
||||
$this->data = $this->controller->data;
|
||||
$this->webservices = $this->controller->webservices;
|
||||
$this->plugin = $this->controller->plugin;
|
||||
if(is_object($controller)){
|
||||
$this->controller =& $controller;
|
||||
$this->_viewVars = $this->controller->_viewVars;
|
||||
$this->action = $this->controller->action;
|
||||
$this->autoLayout = $this->controller->autoLayout;
|
||||
$this->autoRender = $this->controller->autoRender;
|
||||
$this->base = $this->controller->base;
|
||||
$this->webroot = $this->controller->webroot;
|
||||
$this->helpers = $this->controller->helpers;
|
||||
$this->here = $this->controller->here;
|
||||
$this->layout = $this->controller->layout;
|
||||
$this->modelNames = $this->controller->modelNames;
|
||||
$this->name = $this->controller->name;
|
||||
$this->pageTitle = $this->controller->pageTitle;
|
||||
$this->viewPath = $this->controller->viewPath;
|
||||
$this->params = $this->controller->params;
|
||||
$this->data = $this->controller->data;
|
||||
$this->webservices = $this->controller->webservices;
|
||||
$this->plugin = $this->controller->plugin;
|
||||
}
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue