0
votes

How can I solve the Deprecated and Strict standards errors in PHP? I got these errors while installing the status.net code:

Deprecated: Assigning the return value of new by reference is deprecated in /opt/lampp/lib/php/Mail.php on line 135

Strict Standards: Non-static method StatusNet::_sn_to_path() should not be called statically in /opt/lampp/htdocs/test/statusnet-0.9.6/lib/statusnet.php on line 266

Strict Standards: Non-static method PEAR::getStaticProperty() should not be called statically in /opt/lampp/htdocs/test/statusnet-0.9.6/lib/statusnet.php on line 277

Strict Standards: Non-static method StatusNet::loadConfigFile() should not be called statically in /opt/lampp/htdocs/test/statusnet-0.9.6/lib/statusnet.php on line 111

Strict Standards: Declaration of Memcached_DataObject::delete() should be compatible with that of DB_DataObject::delete() in /opt/lampp/htdocs/test/statusnet-0.9.6/classes/Memcached_DataObject.php on line 23

Strict Standards: Declaration of Config::staticGet() should be compatible with that of Memcached_DataObject::staticGet() in /opt/lampp/htdocs/test/statusnet-0.9.6/classes/Config.php on line 31

Strict Standards: Declaration of Config::pkeyGet() should be compatible with that of Memcached_DataObject::pkeyGet() in /opt/lampp/htdocs/test/statusnet-0.9.6/classes/Config.php on line 31

2
What is the point of having strict standards when the answer everywhere is to turn off strict error reporting? You could read the errors and go through the statusnet code fixing the strict standards violations since the developer team didn't see a reason to do so when PHP came out with a new version. - user1088706

2 Answers

1
votes

Insert the below line at the top of your site's index.php file.

<?php ini_set('display_errors', 0); ?>
0
votes

This are no "errors" that limit the functionality. Change the error_reporting setting in your php.ini to not include E_DEPRECATED and E_STRICT errors. The php.ini has examples for that.