How to eliminate php5 Strict standards errors?

后端 未结 7 1235
后悔当初
后悔当初 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-03 00:06

    If you're fighting with PHP Strict warnings in cake console output, take a look into your app/config/core.php.

    In CakePhp 1.3 error_reporting(...) is overwritten by the 'log' option, so ensure you exclude E_STRICT here:

    /**
     * CakePHP Log Level:
     *
     * In case of Production Mode CakePHP gives you the possibility to continue logging errors.
     *
     * The following parameters can be used:
     *  Boolean: Set true/false to activate/deactivate logging
     *    Configure::write('log', true);
     *
     *  Integer: Use built-in PHP constants to set the error level (see error_reporting)
     *    Configure::write('log', E_ERROR | E_WARNING);
     *    Configure::write('log', E_ALL ^ E_NOTICE);
     */
    Configure::write('log', E_ALL & ~E_DEPRECATED & ~E_STRICT & ~E_NOTICE);
    
    0 讨论(0)
提交回复
热议问题