Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //AppController.php
- class AppController extends Controller {
- var $components = array(
- 'Auth', 'Session','Actions'
- );
- ...
- //ActionsComponent.php
- App::uses('Component', 'Controller');
- ClassRegistry::init('Action');
- class ActionsComponent extends Component {
- public function initialize(&$controller, $settings = array()) {
- // saving the controller reference for later use
- $this->controller =& $controller; //line 10
- }
- Result:
- Notice (8): Indirect modification of overloaded property ActionsComponent::$controller has no effect [APP/Controller/Component/ActionsComponent.php, line 10]
- Code Context
- }
- foreach ($list as $name) {
- $result = call_user_func_array(array($this->_loaded[$name], $callback), compact('subject') + $params);
- $controller = object(CakeErrorController) {}
- $settings = array()
- ActionsComponent::initialize() - APP/Controller/Component/ActionsComponent.php, line 10
- ObjectCollection::trigger() - CORE/Cake/Utility/ObjectCollection.php, line 130
- call_user_func - [internal], line ??
- CakeEventManager::dispatch() - CORE/Cake/Event/CakeEventManager.php, line 246
- Controller::startupProcess() - CORE/Cake/Controller/Controller.php, line 670
- CakeErrorController::__construct() - CORE/Cake/Controller/CakeErrorController.php, line 63
- ExceptionRenderer::_getController() - CORE/Cake/Error/ExceptionRenderer.php, line 151
- ExceptionRenderer::__construct() - CORE/Cake/Error/ExceptionRenderer.php, line 92
- ErrorHandler::handleException() - CORE/Cake/Error/ErrorHandler.php, line 126
- [main] - [internal], line ??
- Fatal error: Cannot assign by reference to overloaded object in /home/dev/public_html/app/Controller/Component/ActionsComponent.php on line 10
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement