Hi, I have set error reporting in my development environment to E_STRICT by adding to the top of my wp-config.php file:
ini_set( 'error_reporting', E_STRICT );
This shows many places where return values are passed by reference, eg $wp_the_query = &new WP_Query();
throws the error Strict standards: Assigning the return value of new by reference is deprecated in /htdocs/site/wp-settings.php
I'm hoping I can simply remove the reference operator and not break this anywhere else, or do I need a more complex solution? I'm hoping do to better than just turn error_reporting off, that would just feel dirty.
I am running Wordpress 2.7.1 mu, PHP 5.2.6 with Xdebug 2.1.0.
Edit:
As well as passing objects / values by reference, there are plenty of other warnings, including Redefining already defined constructor for class WP_Object_Cache
, Creating default object from empty value
, Non-static method WP_Http_ExtHTTP::test() should not be called statically
, etc. Rather than looking for specific solutions, can you share any experiences in dealing with this mess of code? I'm okay with modifying the core files, at the risk of losing the ability upgrade in the future.