Jhanvi
Jhanvi

Reputation: 592

Migrate Cakephp1.3 to 2.0

I have developed one heavily loaded project in cakephp 1.3 now my client want it in latest CakePHP version.

I have migrated it using shell script based tutorial provided on below link: http://book.cakephp.org/2.0/en/appendices/2-0-migration-guide.html

version get replaced it got migrated in CakePHP 2.0 version but now on running a project i am getting an error

Fatal error: Call to a member function parseAccept() on a non-object in D:\xampp\htdocs\arguenet1\lib\Cake\Controller\Component\RequestHandlerComponent.php on line 134

project is mostly developed with ajax functionality and requesthandler componenet also have been used to check isAjax request or not on component side.

Can anyone help me to solve this error...Thanks in advance.

Upvotes: 5

Views: 331

Answers (1)

beporter
beporter

Reputation: 3970

The signature for the __construct() method has changed in 2.x. See the API docs here. Try modifying your AppController::__construct() like so:

public function __construct($request = null, $response = null) {
    parent::__construct($request, $response);
    // Your code here.
}

Credit to this Google Groups thread.

Upvotes: 2

Related Questions