The project was developed with CakePHP-1.3
Now I'm trying to upgrade to CakePHP-2.0
I have renamed all controllers and mode with the CakePHP-2.0 conventions.
Now if I reloads the page I got error like this:
Indirect modification of overloaded property PostsController::$Auth has no effect [APP/Controller/PostsController.php, line 11]
The code:
PostsController:
$this->Auth->allowedActions =
array('index','view','archive','listarchive','viewfromcategory','tags','aboutme','contact','polls');
AppController:
class AppController extends Controller {
var $components = array('Acl', 'Session', 'Auth','RequestHandler');
//var $helpers = array('Html', 'Form','Js','Session','Cache');
var $helpers = array('Html', 'Form','Js','Session');
function beforeFilter() {
//Configure AuthComponent
$this->Auth->actionPath = 'controllers/';
$this->Auth->allowedActions = array('display');
//$this->Auth->authorize = 'actions';
$this->Auth->loginAction = array('controller' => 'users', 'action' => 'login');
$this->Auth->logoutRedirect = array('controller' => 'posts', 'action' => 'index');
$this->Auth->loginRedirect = array('controller' => 'posts', 'action' => 'index');
}
How can I fix this problem?