PHP E_WARNING being shown despite php.ini

I'm on OS X. I just upgraded to High Sierra 10.13.x from Sierra 10.12.x, and thus to PHP 7 from PHP 5. I suddenly started getting PHP Warning errors displayed in the browser. (It's fine that PHP errors get displayed in the browser, but I didn't want to see warnings.) No amount of tinkering with php.ini would fix this. Eventually I realized that the problem wasn't with php.ini, but with Wordpress itself. (Warnings in non-Wordpress PHP files weren't displayed, as should be the case.) It appears that something in Wordpress is overriding my error_reporting settings in php.ini.

How can I stop Wordpress from doing this?

Topic php.ini php errors Wordpress

Category Web


Did you check your wp-config.php file for WP_DEBUG constants?

//enable debug
define( 'WP_DEBUG', true );

//save to file
define( 'WP_DEBUG_LOG', true );

//show in browser
define( 'WP_DEBUG_DISPLAY', true);

See https://codex.wordpress.org/WP_DEBUG for more details.

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.