将 Cakephp1.3 迁移到 2.0

Jha*_*nvi 5 version-control

我在 cakephp 1.3 中开发了一个负载很重的项目,现在我的客户想要它在最新的 CakePHP 版本中。

我已经使用以下链接提供的基于 shell 脚本的教程迁移了它:http : //book.cakephp.org/2.0/en/appendices/2-0-migration-guide.html

版本被替换它在 CakePHP 2.0 版本中被迁移但是现在在运行一个项目时我收到一个错误

致命错误:在第 134 行调用 D:\xampp\htdocs\arguenet1\lib\Cake\Controller\Component\RequestHandlerComponent.php 中非对象上的成员函数 parseAccept()

项目主要是用ajax功能开发的,requesthandler组件也被用来在组件端检查isAjax请求与否。

谁能帮我解决这个错误...提前致谢。

bep*_*ter 2

该方法的签名__construct()在 2.x 中已更改。请参阅此处的 API 文档。尝试像这样修改您的 AppController::__construct() :

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

感谢此 Google 网上论坛帖子