diff options
author | Thomas Steur <tsteur@users.noreply.github.com> | 2020-11-25 23:50:56 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-25 23:50:56 +0300 |
commit | ea4ad4bca43d0d218807041e5263af8fd328bfeb (patch) | |
tree | a04d3b6701540b061351545f2557225fd34cc2be /plugins/SEO | |
parent | 4695315a0d1b717700d56108edb3c5237257bd9f (diff) |
Fix notice value might not be defined in alexa (#16800)
> WARNING: plugins/SEO/Metric/Alexa.php(52): Notice - Undefined variable: value - Matomo 4.0.0 - Please report this message in the Matomo forums: https://forum.matomo.org (please do a search first as it might have been reported already) (Module: SEO, Action: getRank, In CLI mode: false)
Was getting above error. Probably because of:
> WARNING: Error while getting Alexa SEO stats via fallback method: curl_exec: Resolving timed out after 10069 milliseconds. Hostname requested was: www.alexa.com (Module: SEO, Action: getRank, In CLI mode: false)
Diffstat (limited to 'plugins/SEO')
-rw-r--r-- | plugins/SEO/Metric/Alexa.php | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/plugins/SEO/Metric/Alexa.php b/plugins/SEO/Metric/Alexa.php index 55a3d1df71..8dc3e439d2 100644 --- a/plugins/SEO/Metric/Alexa.php +++ b/plugins/SEO/Metric/Alexa.php @@ -32,6 +32,7 @@ class Alexa implements MetricsProvider public function getMetrics($domain) { + $value = null; try { $response = Http::sendHttpRequest(self::URL . urlencode($domain), $timeout = 10, @$_SERVER['HTTP_USER_AGENT']); $dom = new \DomDocument(); |