From 1ebbf8bfc16f44f200c0d4dadd194c6b2bfb414a Mon Sep 17 00:00:00 2001 From: Nicolas Ganivet Date: Sun, 1 Feb 2015 11:24:17 -0700 Subject: [PATCH] CRM-15901: Turn off PHP errors display for all ajax calls --- CRM/Core/Invoke.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CRM/Core/Invoke.php b/CRM/Core/Invoke.php index a1e5f726f9..59777444d5 100644 --- a/CRM/Core/Invoke.php +++ b/CRM/Core/Invoke.php @@ -64,6 +64,10 @@ class CRM_Core_Invoke { if ($args[0] !== 'civicrm') { return; } + // CRM-15901: Turn off PHP errors display for all ajax calls + if (CRM_Utils_Array::value(1, $args) == 'ajax' || CRM_Utils_Array::value('snippet', $_REQUEST)) { + ini_set('display_errors', 0); + } if (!defined('CIVICRM_SYMFONY_PATH')) { try { -- 2.25.1