If you’re getting this message on PHP this is due to your PHP error reporting settings not being set correctly.
You can suppress the Notice warnings by changing the error reporting settings on PHP.ini (permanent change) or adding an extra line to your PHP script.
Changing PHP.ini:
Changing your PHP.ini makes the change permanent and available to every PHP script you run.
- Edit your PHP.ini file
- Locate the line that has error_reporting without the ; in the beginning (ex: error_reporting = E_ALL)
- Change this to error_reporting = E_ALL & ~E_NOTICE
- Save PHP.ini
Adding line to your script:
Just add the following line to the beginning of your script:
error_reporting (E_ALL ^ E_NOTICE);
Explanation:
error_reporting = E_ALL & ~E_NOTICE tells the system to show all errors and warnings except those for notices.
Be the first to comment