From 2b1aa3a3b9a2cf586d0a6a68e715b79683c48091 Mon Sep 17 00:00:00 2001 From: Paulo Fagiani Date: Thu, 25 May 2017 16:21:21 -0300 Subject: [PATCH] Avoid PHP 7.1 to print warnings/errors in response After the last bump to PHP 7.* looks like the default is to throw errors and warnings on the screen even with WP_DEBUG set to false. This PR aims to fix it. --- public/wp-config.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/public/wp-config.php b/public/wp-config.php index f0dd4f6cfd..3ad1f93d8a 100644 --- a/public/wp-config.php +++ b/public/wp-config.php @@ -237,6 +237,11 @@ define( 'WP_DEBUG_LOG', false ); define( 'WP_DEBUG_DISPLAY', false ); } else { + ini_set( 'log_errors', 'On' ); + ini_set( 'display_errors', 'Off' ); + ini_set( 'error_reporting', E_ALL ); + define( 'WP_DEBUG_LOG', true ); + define( 'WP_DEBUG_DISPLAY', false ); define( 'WP_DEBUG', false ); }