Best way to turn off PHP Warning messages in error logs

What is the best way to set PHP error reporting within Omeka Classic 3.0.2 so that PHP Warning messages are suppressed and don’t populate error logs?

You can set the error_reporting level in your php.ini file.

There typically shouldn’t be so many warnings that they’re swamping the logs, though.

Hey. If I’m just wanting to make this change for one PHP file, temporarily, is Omeka good with using something like
error_reporting(E_ALL ^ E_WARNING);

just in the individual file?

It won’t hurt Omeka to alter the error_reporting like that, no.

Note that you’ll affect the reporting for anything that executes after the file you make that change in as well, though. You could restore the original error_reporting value after, if you want.

This topic was automatically closed 360 days after the last reply. New replies are no longer allowed.