From 23b49558cd5f70c351788a129042a62fe8170dfe Mon Sep 17 00:00:00 2001
From: alecpl <alec@alec.pl>
Date: Tue, 12 Apr 2011 05:06:49 -0400
Subject: [PATCH] - Fix handling of debug_level=4 in ajax requests (#1487831)
---
program/include/rcube_config.php | 9 +++------
1 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/program/include/rcube_config.php b/program/include/rcube_config.php
index 5d17605..31608a3 100644
--- a/program/include/rcube_config.php
+++ b/program/include/rcube_config.php
@@ -87,12 +87,9 @@
ini_set('error_log', $this->prop['log_dir'].'/errors');
}
}
- if ($this->prop['debug_level'] & 4) {
- ini_set('display_errors', 1);
- }
- else {
- ini_set('display_errors', 0);
- }
+
+ // enable display_errors in 'show' level, but not for ajax requests
+ ini_set('display_errors', intval(empty($_REQUEST['_remote']) && ($this->prop['debug_level'] & 4)));
// export config data
$GLOBALS['CONFIG'] = &$this->prop;
--
Gitblit v1.9.1