summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2009-07-30 10:46:53 +0000
committerDries Buytaert <dries@buytaert.net>2009-07-30 10:46:53 +0000
commit8140ed0d84b15156f10fff93430ddefa5dab91f3 (patch)
tree70d5f977bdd3abf026e0628769bcd15e3ae27174 /includes
parent4e96b4e5dfbc6d88d6bce38602916ffd659a5b61 (diff)
downloadbrdo-8140ed0d84b15156f10fff93430ddefa5dab91f3.tar.gz
brdo-8140ed0d84b15156f10fff93430ddefa5dab91f3.tar.bz2
- Patch #443154 by boombatower, pwolanin: properly report fatal errors as failures.
Diffstat (limited to 'includes')
-rw-r--r--includes/common.inc8
1 files changed, 8 insertions, 0 deletions
diff --git a/includes/common.inc b/includes/common.inc
index 41399f8e2..af16de978 100644
--- a/includes/common.inc
+++ b/includes/common.inc
@@ -3443,6 +3443,14 @@ function _drupal_bootstrap_full() {
set_error_handler('_drupal_error_handler');
set_exception_handler('_drupal_exception_handler');
+ if (isset($_SERVER['HTTP_USER_AGENT']) && strpos($_SERVER['HTTP_USER_AGENT'], 'simpletest') !== FALSE) {
+ // Valid SimpleTest user-agent, log fatal errors to test specific file
+ // directory. The user-agent is validated in DRUPAL_BOOTSTRAP_DATABASE
+ // phase so as long as it is a SimpleTest user-agent it is valid.
+ ini_set('log_errors', 1);
+ ini_set('error_log', file_directory_path() . '/error.log');
+ }
+
// Emit the correct charset HTTP header.
drupal_set_header('Content-Type', 'text/html; charset=utf-8');
// Detect string handling method