Advertisement
Guest User

Untitled

a guest
Jul 31st, 2013
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.74 KB | None | 0 0
  1. //AppController.php
  2. class AppController extends Controller {
  3.  
  4.     var $components = array(
  5.         'Auth', 'Session','Actions'
  6.     );
  7. ...
  8.  
  9. //ActionsComponent.php
  10.  
  11. App::uses('Component', 'Controller');
  12. ClassRegistry::init('Action');
  13.  
  14. class ActionsComponent extends Component {
  15.  
  16.     public function initialize(&$controller, $settings = array()) {
  17.         // saving the controller reference for later use
  18.         $this->controller =& $controller;                     //line 10
  19.     }
  20.  
  21.  
  22.  
  23. Result:
  24.  
  25. Notice (8): Indirect modification of overloaded property ActionsComponent::$controller has no effect [APP/Controller/Component/ActionsComponent.php, line 10]
  26. Code Context
  27.         }
  28.         foreach ($list as $name) {
  29.             $result = call_user_func_array(array($this->_loaded[$name], $callback), compact('subject') + $params);
  30. $controller = object(CakeErrorController) {}
  31. $settings = array()
  32. ActionsComponent::initialize() - APP/Controller/Component/ActionsComponent.php, line 10
  33. ObjectCollection::trigger() - CORE/Cake/Utility/ObjectCollection.php, line 130
  34. call_user_func - [internal], line ??
  35. CakeEventManager::dispatch() - CORE/Cake/Event/CakeEventManager.php, line 246
  36. Controller::startupProcess() - CORE/Cake/Controller/Controller.php, line 670
  37. CakeErrorController::__construct() - CORE/Cake/Controller/CakeErrorController.php, line 63
  38. ExceptionRenderer::_getController() - CORE/Cake/Error/ExceptionRenderer.php, line 151
  39. ExceptionRenderer::__construct() - CORE/Cake/Error/ExceptionRenderer.php, line 92
  40. ErrorHandler::handleException() - CORE/Cake/Error/ErrorHandler.php, line 126
  41. [main] - [internal], line ??
  42.  
  43. 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