mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
Adding fix for components not being available in PHP 4
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@3102 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
a8e49419bf
commit
eefd467da7
2 changed files with 13 additions and 2 deletions
|
@ -49,7 +49,15 @@ class Component extends Object {
|
|||
*
|
||||
* @return Component
|
||||
*/
|
||||
function __construct(&$controller) {
|
||||
function __construct() {
|
||||
//parent::__construct();
|
||||
}
|
||||
/**
|
||||
* Used to initialize the components for current controller
|
||||
*
|
||||
* @param object $controller
|
||||
*/
|
||||
function init(&$controller) {
|
||||
$this->controller =& $controller;
|
||||
if ($this->controller->components !== false) {
|
||||
$loaded = array();
|
||||
|
@ -64,7 +72,9 @@ class Component extends Object {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Enter description here...
|
||||
*
|
||||
|
|
|
@ -237,7 +237,8 @@ class Controller extends Object{
|
|||
}
|
||||
|
||||
if (!empty($this->components)) {
|
||||
$component = &new Component($this);
|
||||
$component = new Component();
|
||||
$component->init($this);
|
||||
}
|
||||
parent::__construct();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue