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:
phpnut 2006-06-15 09:58:45 +00:00
parent a8e49419bf
commit eefd467da7
2 changed files with 13 additions and 2 deletions

View file

@ -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...
*

View file

@ -237,7 +237,8 @@ class Controller extends Object{
}
if (!empty($this->components)) {
$component = &new Component($this);
$component = new Component();
$component->init($this);
}
parent::__construct();
}