diff options
author | Stefan Giehl <stefan@matomo.org> | 2022-02-01 11:08:31 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-01 11:08:31 +0300 |
commit | 4fea439e6530f6779f3de845e2913ce508a83760 (patch) | |
tree | 7b80e54e5f24f8dec406700cad475fe541c573b5 /config | |
parent | ce2782827667e4cbf5162cfc7a84bfe657de96d0 (diff) |
Prevent possible error when action is provided as array (#18706)
* Prevent possible error when action is provided as array
* Use Piwik::getModule / Piwik::getAction in a couple more places
* fix test
Diffstat (limited to 'config')
-rw-r--r-- | config/environment/test.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/config/environment/test.php b/config/environment/test.php index e6cbbd62f0..0a9aea959a 100644 --- a/config/environment/test.php +++ b/config/environment/test.php @@ -1,5 +1,6 @@ <?php +use Piwik\Piwik; use Psr\Container\ContainerInterface; use Piwik\Common; use Piwik\Tests\Framework\Mock\FakeAccess; @@ -121,7 +122,7 @@ return array( })), array('Test.Mail.send', \DI\value(function (\PHPMailer\PHPMailer\PHPMailer $mail) { - $outputFile = PIWIK_INCLUDE_PATH . '/tmp/' . Common::getRequestVar('module', '') . '.' . Common::getRequestVar('action', '') . '.mail.json'; + $outputFile = PIWIK_INCLUDE_PATH . '/tmp/' . Piwik::getModule() . '.' . Piwik::getAction() . '.mail.json'; $outputContent = str_replace("=\n", "", $mail->Body ?: $mail->AltBody); $outputContent = str_replace("=0A", "\n", $outputContent); $outputContent = str_replace("=3D", "=", $outputContent); |