diff options
author | Dries Buytaert <dries@buytaert.net> | 2008-12-09 11:09:26 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2008-12-09 11:09:26 +0000 |
commit | 6f859fdd8fa5272a3491074792c0c0015051cee9 (patch) | |
tree | 43a6c4533f005d70ff1092382c56bae884ac9922 /includes | |
parent | c50651f7fb348ec2dc6e29cdf462f22d64045002 (diff) | |
download | brdo-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.inc | 8 |
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++; |