Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authordiosmosis <diosmosis@users.noreply.github.com>2020-11-04 07:52:00 +0300
committerGitHub <noreply@github.com>2020-11-04 07:52:00 +0300
commit6b12f37eb630d25dffa13e315b894abda80ed5af (patch)
treecadb29189f71915124cffb350e9b6fbf786825dc /tests
parent0739af50f6bf35a747e110a2f1178e17e8c21fa2 (diff)
require PIWIK_PRINT_ERROR_BACKTRACE for exception backtraces in logs (#16640)
* require PIWIK_PRINT_ERROR_BACKTRACE for exception backtraces in logs * consolidate uses of getTraceAsString to use single method where possible which always checks if should print stacktrace * replace sensitive values and add some tests * apply more review comments * another tweak * remove backtrace omitted error * fix test * fix test for travis * fix test
Diffstat (limited to 'tests')
-rw-r--r--tests/PHPUnit/proxy/piwik.php6
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) {