summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2008-12-09 11:09:26 +0000
committerDries Buytaert <dries@buytaert.net>2008-12-09 11:09:26 +0000
commit6f859fdd8fa5272a3491074792c0c0015051cee9 (patch)
tree43a6c4533f005d70ff1092382c56bae884ac9922 /includes
parentc50651f7fb348ec2dc6e29cdf462f22d64045002 (diff)
downloadbrdo-6f859fdd8fa5272a3491074792c0c0015051cee9.tar.gz
brdo-6f859fdd8fa5272a3491074792c0c0015051cee9.tar.bz2
- Patch #328781 by Damien Tournoud and Dave Reid: fixed simpletest error reporting.
Diffstat (limited to 'includes')
-rw-r--r--includes/common.inc8
1 files changed, 6 insertions, 2 deletions
diff --git a/includes/common.inc b/includes/common.inc
index b8816147f..e9b325288 100644
--- a/includes/common.inc
+++ b/includes/common.inc
@@ -731,12 +731,16 @@ function _drupal_log_error($error, $fatal = FALSE) {
// When running inside the testing framework, we relay the errors
// to the tested site by the way of HTTP headers.
- if (preg_match("/^simpletest\d+/", $_SERVER['HTTP_USER_AGENT']) && !headers_sent() && !defined('SIMPLETEST_DONT_COLLECT_ERRORS')) {
+ if (preg_match("/^simpletest\d+/", $_SERVER['HTTP_USER_AGENT']) && !headers_sent() && (!defined('SIMPLETEST_COLLECT_ERRORS') || SIMPLETEST_COLLECT_ERRORS)) {
static $number = 0;
$assertion = array(
$error['%message'],
$error['%type'],
- $error['%function'],
+ array(
+ 'function' => $error['%function'],
+ 'file' => $error['%file'],
+ 'line' => $error['%line'],
+ ),
);
header('X-Drupal-Assertion-' . $number . ': ' . rawurlencode(serialize($assertion)));
$number++;