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:
authorMatthieu Aubry <mattab@users.noreply.github.com>2017-05-09 01:05:35 +0300
committerGitHub <noreply@github.com>2017-05-09 01:05:35 +0300
commit292b4bd83e0128a2a1802fc5b34d3c1d6f2eeb53 (patch)
treea07e6ca76f55061dce3289bd8bb10382c5bb5d31 /plugins/Diagnostics
parentd5b7c848aa38a2e47ea48b232787f1c7102b1ceb (diff)
Notice - Undefined index: headers in PageSpeedCheck.php (#11674)
Reported in https://forum.piwik.org/t/diagnostic-pagespeedcheck-php-undefined-index/24144/1
Diffstat (limited to 'plugins/Diagnostics')
-rw-r--r--plugins/Diagnostics/Diagnostic/PageSpeedCheck.php6
1 files changed, 2 insertions, 4 deletions
diff --git a/plugins/Diagnostics/Diagnostic/PageSpeedCheck.php b/plugins/Diagnostics/Diagnostic/PageSpeedCheck.php
index 8f456a04bb..495e13ee45 100644
--- a/plugins/Diagnostics/Diagnostic/PageSpeedCheck.php
+++ b/plugins/Diagnostics/Diagnostic/PageSpeedCheck.php
@@ -72,9 +72,7 @@ class PageSpeedCheck implements Diagnostic
// If the test failed, we assume Page speed is not enabled
return false;
}
-
- $headers = $page['headers'];
-
- return isset($headers['X-Mod-Pagespeed']) || isset($headers['X-Page-Speed']);
+
+ return isset($page['headers']['X-Mod-Pagespeed']) || isset($page['headers']['X-Page-Speed']);
}
}