Move CakeFp1.3 to 2.0

I developed one heavily loaded project in cakephp 1.3, now my client wants it in the latest version of CakePHP.

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

the version is replaced, it was ported to CakePHP 2.0, but now when I start the project I get an error

Fatal error: calling the parseAccept () member function for a non-object in D: \ xampp \ htdocs \ argumentenet1 \ lib \ Cake \ Controller \ Component \ RequestHandlerComponent.php on line 134

the project is mainly developed using the ajax function, and the requesthandler componentenet is also used to check whether the isAjax request is on the component side.

Can someone help me solve this error ... Thanks in advance.

+4
source share
1 answer

The signature for the __construct() method has changed in 2.x. See the API docs here . Try changing your AppController :: __ construct () as follows:

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

Confirm this stream of Google Groups .

+2
source

Source: https://habr.com/ru/post/1434333/


All Articles