Dea*_*ock 6 php cakephp strict
我将PHP更新到版本5.4后出现以下错误
Strict Standards: Non-static method Debugger::invoke() should not be called statically, assuming $this from incompatible context in /usr/share/php/cake/libs/debugger.php on line 575
Strict Standards: Non-static method Debugger::getInstance() should not be called statically, assuming $this from incompatible context in /usr/share/php/cake/libs/debugger.php on line 575
Run Code Online (Sandbox Code Playgroud)
我已经尝试过以下解决方案
安装php5-curl软件包后,Cakephp不起作用(无法找到"Cake"文件夹,因为我已经烘焙了我的项目)
/sf/ask/825935981/?lq=1(无法关闭错误)
每次更改后清除蛋糕缓存,Web浏览器缓存,Cookie和重新启动的服务器.甚至尝试过私密浏览和chrome,firefox,也就是.
我相信这是因为这个应用程序是基于较旧版本的CakePHP构建的,它可能会使用一些不推荐使用的函数.如果您(或其他人)可以将Cake升级到新的稳定分支,那将是非常棒的.截至目前,在您的core.php中尝试此操作,您可以从错误报告中删除E_STRICT:
即转到app/Config/core.php查找
Configure::write('Error', array(
'handler' => 'ErrorHandler::handleError',
'level' => E_ALL & ~E_DEPRECATED,
'trace' => true
));
Run Code Online (Sandbox Code Playgroud)
把它换成
Configure::write('Error', array(
'handler' => 'ErrorHandler::handleError',
'level' => E_ALL & ~E_STRICT & ~E_DEPRECATED,
'trace' => true
));
Run Code Online (Sandbox Code Playgroud)