Turn off deprecated errors in PHP 5.3

前端 未结 9 1453
天涯浪人
天涯浪人 2020-12-02 11:32

My server is running PHP 5.3 and my WordPress install is spitting these errors out on me, causing my session_start() to break.

Deprecated: Assigning the re         


        
相关标签:
9条回答
  • 2020-12-02 12:26

    In file wp-config.php you can find constant WP_DEBUG. Make sure it is set to false.

    define('WP_DEBUG', false);
    

    This is for WordPress 3.x.

    0 讨论(0)
  • 2020-12-02 12:26

    I tend to use this method

    $errorlevel=error_reporting();
    $errorlevel=error_reporting($errorlevel & ~E_DEPRECATED);
    

    In this way I do not turn off accidentally something I need

    0 讨论(0)
  • 2020-12-02 12:32

    I needed to adapt this to

    error_reporting = E_ALL & ~E_DEPRECATED
    
    0 讨论(0)
提交回复
热议问题