How to eliminate php5 Strict standards errors?

后端 未结 7 1255
后悔当初
后悔当初 2020-12-02 23:40

After upgrading my PHP to 5.4.3 (WAMP server 2.2), my web app made in CakePHP 1.3, is showing the following errors in my index:

Strict standards: Rede

7条回答
  •  感动是毒
    2020-12-02 23:59

    Instead of modifying the cake core files, which sucks if you want to update your cake version, go into your Config/core.php file and look for the error handler configuration:

    Configure::write('Error', array(
        'handler' => 'ErrorHandler::handleError',
        'level' => E_ALL & ~E_DEPRECATED,
        'trace' => true
    ));
    

    and replace 'level' with this:

    ...
    'level' => E_ALL & ~E_STRICT & ~E_DEPRECATED,
    ...
    

提交回复
热议问题