Skip to content
Extraits de code Groupes Projets
Valider 6adf5549 rédigé par Matthieu Aubry's avatar Matthieu Aubry Validation de GitHub
Parcourir les fichiers

fix WARNING: /home/piwik/htdocs/plugins/Referrers/Controller.php(422) Warning...

fix WARNING: /home/piwik/htdocs/plugins/Referrers/Controller.php(422) Warning - Invalid argument supplied for foreach() (#11098)

Reported in https://forum.piwik.org/t/warning-message-plugins-referrers-controller-php-422-warning/22314
parent fe904148
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -410,7 +410,7 @@ function DisplayTopKeywords($url = "") ...@@ -410,7 +410,7 @@ function DisplayTopKeywords($url = "")
$api = $api . "&url=" . urlencode($url); $api = $api . "&url=" . urlencode($url);
$keywords = @json_decode(file_get_contents($api), $assoc = true); $keywords = @json_decode(file_get_contents($api), $assoc = true);
Common::sendHeader('Content-Type: text/html; charset=utf-8', true); Common::sendHeader('Content-Type: text/html; charset=utf-8', true);
if ($keywords === false || isset($keywords["result"])) { if ($keywords === false || isset($keywords["result"]) || !is_array($keywords)) {
// DEBUG ONLY: uncomment for troubleshooting an empty output (the URL output reveals the token_auth) // DEBUG ONLY: uncomment for troubleshooting an empty output (the URL output reveals the token_auth)
//echo "Error while fetching the <a href=\'".$api."\'>Top Keywords from Piwik</a>"; //echo "Error while fetching the <a href=\'".$api."\'>Top Keywords from Piwik</a>";
return; return;
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter