diff options
author | Stefan Giehl <stefan@matomo.org> | 2022-02-04 13:05:54 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-04 13:05:54 +0300 |
commit | 2ac01ae7967f3445274b1fc3c2d51ef90ac61c26 (patch) | |
tree | 31ba70916cbdcb81d0799e2c656bf1ebf1f3839c /plugins/Live | |
parent | b132cac81a6b1f812b03701e3051245b9720a807 (diff) |
Fix handling of invalid limit values for Live.getVisitorProfile (#18716)
Diffstat (limited to 'plugins/Live')
-rw-r--r-- | plugins/Live/API.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/Live/API.php b/plugins/Live/API.php index 241884af4d..2318e03e26 100644 --- a/plugins/Live/API.php +++ b/plugins/Live/API.php @@ -204,7 +204,7 @@ class API extends \Piwik\Plugin\API Piwik::checkUserHasViewAccess($idSite); Live::checkIsVisitorProfileEnabled($idSite); - if ($limitVisits <= 0) { + if (!is_numeric($limitVisits) || $limitVisits <= 0) { $limitVisits = VisitorProfile::VISITOR_PROFILE_MAX_VISITS_TO_SHOW; } else { $limitVisits = (int) $limitVisits; |