Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing build #14296

Merged
merged 7 commits into from Mar 31, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions core/Plugin/ControllerAdmin.php
Expand Up @@ -240,6 +240,10 @@ private static function notifyWhenPhpVersionIsNotCompatibleWithNextMajorPiwik()

private static function notifyWhenPhpVersionIsEOL()
{
if (defined('PIWIK_TEST_MODE')) { // to avoid changing every admin UI test
return;
}

$notifyPhpIsEOL = Piwik::hasUserSuperUserAccess() && ! self::isPhpVersionAtLeast71();
if (!$notifyPhpIsEOL) {
return;
Expand Down
13 changes: 7 additions & 6 deletions plugins/Monolog/config/config.php
Expand Up @@ -38,12 +38,7 @@

$writerNames = array_map('trim', $writerNames);

$writers = [
// we always add the null handler to make sure there is at least one handler specified. otherwise Monolog will
// add a stream handler to stderr w/ a DEBUG log level, which will cause archiving requests to fail.
$c->get(\Monolog\Handler\NullHandler::class),
];

$writers = [];
foreach ($writerNames as $writerName) {
if ($writerName === 'screen' && \Piwik\Common::isPhpCliMode()) {
continue; // screen writer is only valid for web requests
Expand Down Expand Up @@ -77,6 +72,12 @@
$writers[] = $c->get(LogCaptureHandler::class);
}

// we always add the null handler to make sure there is at least one handler specified. otherwise Monolog will
// add a stream handler to stderr w/ a DEBUG log level, which will cause archiving requests to fail.
if (empty($writers)) {
$writers[] = $c->get(\Monolog\Handler\NullHandler::class);
}

return array_values($writers);
}),

Expand Down
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion tests/PHPUnit/Fixtures/UITestFixture.php
Expand Up @@ -150,6 +150,7 @@ public function performSetUp($setupEnvironmentOnly = false)
}

$this->testEnvironment->forcedNowTimestamp = $forcedNowTimestamp;
$this->testEnvironment->tokenAuth = self::getTokenAuth();
$this->testEnvironment->save();

$this->angularXssLabel = $this->xssTesting->forAngular('datatablerow');
Expand Down Expand Up @@ -587,7 +588,7 @@ public function __construct()

public function isExistingApiAction($pluginName, $apiAction)
{
if ($pluginName == 'ExampleAPI' && ($apiAction != 'xssReportforTwig' || $apiAction != 'xssReportforAngular')) {
if ($pluginName == 'ExampleAPI' && ($apiAction == 'xssReportforTwig' || $apiAction == 'xssReportforAngular')) {
return true;
}
return parent::isExistingApiAction($pluginName, $apiAction);
Expand Down