From 19e8cc4634657bebfc76f380d89328f651c0434d Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Wed, 12 Aug 2015 17:45:49 +0100 Subject: [PATCH] display_errors > error_reporting --- includes/class-wc-ajax.php | 4 ++-- readme.txt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/class-wc-ajax.php b/includes/class-wc-ajax.php index 6e672f79186..f62467ea385 100644 --- a/includes/class-wc-ajax.php +++ b/includes/class-wc-ajax.php @@ -46,8 +46,8 @@ class WC_AJAX { if ( ! defined( 'WC_DOING_AJAX' ) ) { define( 'WC_DOING_AJAX', true ); } - // Turn off error_reporting during AJAX events to prevent malformed JSON - error_reporting(0); + // Turn off display_errors during AJAX events to prevent malformed JSON + @ini_set( 'display_errors', 0 ); } } diff --git a/readme.txt b/readme.txt index e0d73f52565..a8b7803c1c7 100644 --- a/readme.txt +++ b/readme.txt @@ -164,7 +164,7 @@ Yes you can! Join in on our [GitHub repository](http://github.com/woothemes/wooc * Fix - Tab hiding with some theme markup. * Fix - Ajax variations: stripslashes to fix attributes with quotes. * Fix - No longer returns to the first variation list page when deleting one variation. -* Tweak - Disable error_reporting during ajax requests to prevent malformed JSON. +* Tweak - Disable display_errors during ajax requests to prevent malformed JSON. * Tweak - When merging shipping taxes with a shipping rate taxes, ensure shipping rate taxes is not malformed. = 2.4.2 - 11/08/2015 =