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 return value of new by reference is deprecated in /home//public_html/hub/wp-settings.php on line 647 Deprecated: Assigning the return value of new by reference is deprecated in /home//public_html/hub/wp-settings.php on line 662 Deprecated: Assigning the return value of new by reference is deprecated in /home//public_html/hub/wp-settings.php on line 669 Deprecated: Assigning the return value of new by reference is deprecated in /home//public_html/hub/wp-settings.php on line 676 Deprecated: Assigning the return value of new by reference is deprecated in /home//public_html/hub/wp-settings.php on line 712
This is annoying, but I do not want to turn off on screen error reporting. How do I disable these bothersome deprecated warnings?
I am running WordPress 2.9.2.
To turn off or disable error reporting in PHP, set the value to zero. For example, use the code snippet: <? php error_reporting(0); ?>
As an interim solution, it is simple to suppress PHP deprecation warnings by disabling WP_DEBUG mode, or (more advanced) by removing E_DEPRECATED from your error_reporting setting.
You can do it in code by calling the following functions.
error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE);
or
error_reporting(E_ALL ^ E_DEPRECATED);
To only get those errors that cause the application to stop working, use:
error_reporting(E_ALL ^ (E_NOTICE | E_WARNING | E_DEPRECATED));
This will stop showing notices, warnings, and deprecated errors.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With