Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Giehl <stefan@matomo.org>2022-02-04 13:05:54 +0300
committerGitHub <noreply@github.com>2022-02-04 13:05:54 +0300
commit2ac01ae7967f3445274b1fc3c2d51ef90ac61c26 (patch)
tree31ba70916cbdcb81d0799e2c656bf1ebf1f3839c
parentb132cac81a6b1f812b03701e3051245b9720a807 (diff)
Fix handling of invalid limit values for Live.getVisitorProfile (#18716)
-rw-r--r--plugins/Live/API.php2
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;