diff options
author | Stefan Giehl <stefan@piwik.org> | 2018-09-30 23:43:06 +0300 |
---|---|---|
committer | diosmosis <diosmosis@users.noreply.github.com> | 2018-09-30 23:43:06 +0300 |
commit | 019ce0114819d2a88a535fd0f122244ed3406bfa (patch) | |
tree | f7974f2419a52678e1a403b4ca0cb54b0daf140a /plugins/API | |
parent | 0e3702128ab244017339fcee5895b835f8b76de2 (diff) |
Fix various notices caused by invalid parameter values (#13511)
* Properly check dates used for period factory
* Properly check given idSite for rowevolution
* Improve example API to check given parameter type
* cast idSite parameter in ImageGraph API method
Diffstat (limited to 'plugins/API')
-rw-r--r-- | plugins/API/API.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/plugins/API/API.php b/plugins/API/API.php index fa913d887f..6f968a3efe 100644 --- a/plugins/API/API.php +++ b/plugins/API/API.php @@ -449,6 +449,10 @@ class API extends \Piwik\Plugin\API */ public function getRowEvolution($idSite, $period, $date, $apiModule, $apiAction, $label = false, $segment = false, $column = false, $language = false, $idGoal = false, $legendAppendMetric = true, $labelUseAbsoluteUrl = true, $idDimension = false) { + // check if site exists + $idSite = (int) $idSite; + $site = new Site($idSite); + Piwik::checkUserHasViewAccess($idSite); $apiParameters = array(); |