PHP warning are displaying when using WP CLI
I'm running WP CLI 0.25.0 on Debian, PHP 7.0. I keep getting the PHP warnings displayed. In php.ini used for cli I have set error_reporting = E_ALL ~E_DEPRECATED ~E_STRICT ~E_WARNING
(and checked the change), but no difference, the warning is output.
Ran WP CLI with --debug=false
, still no effect.
How to suppress the warning display, as it breaks the JSON output ?
Edit 1
Before using error_log = Off :
PHP Warning: Invalid argument supplied for foreach() in /var/.../theme-settings.php on line 2805
Warning: Invalid argument supplied for foreach() in /var/.../theme-settings.php on line 2805
Using error_log = Off :
Warning: Invalid argument supplied for foreach() in /var/.../theme-settings.php on line 2805
Pay attention that the PHP Warning
disapeared, and theres the Warning
left.