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:
authorThomas Steur <tsteur@users.noreply.github.com>2019-07-25 16:39:28 +0300
committerStefan Giehl <stefan@matomo.org>2019-07-25 16:39:28 +0300
commitca056c4875a9769a9d26c8f88b91caaabc3f09cb (patch)
tree07d551c531fe217ebb4467b5536d845028d8b2ef /plugins/Feedback
parent3e80d9458efcf7bcf15971d8d40e34fd9784f731 (diff)
Don't show feedback prompt when user does not exist (#14692)
Prevents an error in the UI that said ``` Date format must be: YYYY-MM-DD, or 'today' or 'yesterday' or any keyword supported by the strtotime function (see http://php.net/strtotime for more information): ``` when the user did not exist. Eg when you have "virtual" users that aren't actually existing in the user table.
Diffstat (limited to 'plugins/Feedback')
-rw-r--r--plugins/Feedback/Feedback.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/Feedback/Feedback.php b/plugins/Feedback/Feedback.php
index 7b897ea309..fd796ab5df 100644
--- a/plugins/Feedback/Feedback.php
+++ b/plugins/Feedback/Feedback.php
@@ -99,6 +99,9 @@ class Feedback extends \Piwik\Plugin
if ($nextReminderDate === false) {
$model = new Model();
$user = $model->getUser($login);
+ if (empty($user['date_registered'])) {
+ return false;
+ }
$nextReminderDate = Date::factory($user['date_registered'])->addDay(90)->getStartOfDay();
} else {
$nextReminderDate = Date::factory($nextReminderDate);