Skip to content

Commit

Permalink
Fix idSites validation in getAlerts method
Browse files Browse the repository at this point in the history
  • Loading branch information
sgiehl committed Sep 29, 2018
1 parent c37a079 commit 90fb03b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion API.php
Expand Up @@ -92,11 +92,12 @@ public function getValuesForAlertInPast($idAlert, $subPeriodN)
*/
public function getAlerts($idSites, $ifSuperUserReturnAllAlerts = false)
{
$idSites = Site::getIdSitesFromIdSitesString($idSites);

if (empty($idSites)) {
return array();
}

$idSites = Site::getIdSitesFromIdSitesString($idSites);
Piwik::checkUserHasViewAccess($idSites);

if (Piwik::hasUserSuperUserAccess() && $ifSuperUserReturnAllAlerts) {
Expand Down

0 comments on commit 90fb03b

Please sign in to comment.