diff options
author | Thomas Steur <tsteur@users.noreply.github.com> | 2016-04-12 07:02:13 +0300 |
---|---|---|
committer | Thomas Steur <tsteur@users.noreply.github.com> | 2016-04-12 07:02:13 +0300 |
commit | e3677583a96ac5e87f5a22ef8685f7c36cf80c88 (patch) | |
tree | ed97ce137daabc9a59da396f811f167830d64d6f /plugins/Goals/Goals.php | |
parent | 527be7b41ec3f70e944431372845c129f604f32d (diff) |
fix tests (#10040)
Diffstat (limited to 'plugins/Goals/Goals.php')
-rw-r--r-- | plugins/Goals/Goals.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/plugins/Goals/Goals.php b/plugins/Goals/Goals.php index 1f9d229428..ae9ea61cda 100644 --- a/plugins/Goals/Goals.php +++ b/plugins/Goals/Goals.php @@ -90,7 +90,12 @@ class Goals extends \Piwik\Plugin $idSite = Common::getRequestVar('idSite', 0, 'int'); if (!$idSite) { - return; + // fallback for eg API.getReportMetadata which uses idSites + $idSite = Common::getRequestVar('idSites', 0, 'int'); + + if (!$idSite) { + return; + } } $goals = API::getInstance()->getGoals($idSite); |