diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/PHPUnit/proxy/piwik.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/PHPUnit/proxy/piwik.php b/tests/PHPUnit/proxy/piwik.php index 216a1143c1..ec3c801312 100644 --- a/tests/PHPUnit/proxy/piwik.php +++ b/tests/PHPUnit/proxy/piwik.php @@ -35,7 +35,11 @@ try { include PIWIK_INCLUDE_PATH . '/matomo.php'; } catch (Exception $ex) { - echo "Unexpected error during tracking: " . $ex->getMessage() . "\n" . $ex->getTraceAsString() . "\n"; + $stacktrace = ''; + if (\Piwik_ShouldPrintBackTraceWithMessage()) { + $stacktrace = "\n" . $ex->getTraceAsString(); + } + echo "Unexpected error during tracking: " . $ex->getMessage() . $stacktrace . "\n"; } if (ob_get_level() > 1) { |