How to fix Strict Standards: Non-static method for Joomla

After installing Joomla 3.0 plugin, you observe Strict Error Reporting message like:

“Strict Standards: Non-static method VersionLayer::script() should not be called statically, assuming $this from incompatible context in /home/public_html/components/com_<plugin>/views/category/*.php on line 58”

This message shows up if the error-reporting mode of PHP is set to strict. I observed these error messages after the installation of Digital Market extension.

This message is due to with PHP so it will affect not only Digital Market and other Joomla extensions but everything that runs on PHP as well.

Reason for this message:

Most probably in php.ini file in your current settings includes the line “error_reporting = E_ALL | E_STRICT”. This line indicates that the system will report errors as plain messages. The E_STRICT flag is used by developers; it is overkill for regular users and a bad practice for “live sites”.

How to fix this message:

Following methods can fix this message.

1. Using Joomla’s settings

          If you are using Joomla 3.2:
  1. Login to your Joomla backend as super administrator.
  1. Select in the menu – Settings –> Global Configuration. Then click on the “Server” tab and look for the Error Reporting parameters (should be in the “Server Settings” group).
  2. Change it to “None”.

Click on the Save button to save the changes and check the site again in browser. All error messages should have disappeared else you have to modify the php.ini file manually, which is not recommended if you are not a user with web developer experience.