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
diff options
context:
space:
mode:
authorThomas Steur <tsteur@users.noreply.github.com>2019-08-16 04:39:06 +0300
committerdiosmosis <diosmosis@users.noreply.github.com>2019-08-16 04:39:06 +0300
commit0ced1388209c04c2f5aab28b4c4bb01b2a015cc5 (patch)
treec33a4cda3592a2566f8680b9ac00b7c80712152b /plugins/Monolog
parentb97564128019d83ded6666e0b6edf0eaf7dea481 (diff)
Do not record the trace for user input errors (#14771)
Diffstat (limited to 'plugins/Monolog')
-rw-r--r--plugins/Monolog/Processor/ExceptionToTextProcessor.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/plugins/Monolog/Processor/ExceptionToTextProcessor.php b/plugins/Monolog/Processor/ExceptionToTextProcessor.php
index 98958fa82e..ab828dc820 100644
--- a/plugins/Monolog/Processor/ExceptionToTextProcessor.php
+++ b/plugins/Monolog/Processor/ExceptionToTextProcessor.php
@@ -9,6 +9,7 @@
namespace Piwik\Plugins\Monolog\Processor;
use Piwik\ErrorHandler;
+use Piwik\Exception\InvalidRequestParameterException;
use Piwik\Log;
/**
@@ -25,6 +26,10 @@ class ExceptionToTextProcessor
/** @var \Exception $exception */
$exception = $record['context']['exception'];
+ if ($exception instanceof InvalidRequestParameterException) {
+ return $record;
+ }
+
$exceptionStr = sprintf(
"%s(%d): %s\n%s",
$exception instanceof \Exception ? $exception->getFile() : $exception['file'],