summaryrefslogtreecommitdiff
path: root/includes/errors.inc
diff options
context:
space:
mode:
Diffstat (limited to 'includes/errors.inc')
-rw-r--r--includes/errors.inc3
1 files changed, 2 insertions, 1 deletions
diff --git a/includes/errors.inc b/includes/errors.inc
index 1047a6665..96bf8fdb2 100644
--- a/includes/errors.inc
+++ b/includes/errors.inc
@@ -182,7 +182,8 @@ 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 (isset($_SERVER['HTTP_USER_AGENT']) && preg_match("/^simpletest\d+;/", $_SERVER['HTTP_USER_AGENT']) && !headers_sent() && (!defined('SIMPLETEST_COLLECT_ERRORS') || SIMPLETEST_COLLECT_ERRORS)) {
+ $test_info = &$GLOBALS['drupal_test_info'];
+ if (!empty($test_info['in_child_site']) && !headers_sent() && (!defined('SIMPLETEST_COLLECT_ERRORS') || SIMPLETEST_COLLECT_ERRORS)) {
// $number does not use drupal_static as it should not be reset
// as it uniquely identifies each PHP error.
static $number = 0;