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:
-rw-r--r--plugins/VisitTime/functions.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/plugins/VisitTime/functions.php b/plugins/VisitTime/functions.php
index c916224b2c..6a1993c393 100644
--- a/plugins/VisitTime/functions.php
+++ b/plugins/VisitTime/functions.php
@@ -15,7 +15,12 @@ use Piwik\Piwik;
function getTimeLabel($label)
{
- $date = Date::factory(mktime($label));
+ $time = mktime($label);
+ if (empty($time)) {
+ return Piwik::translate('General_Unknown');
+ }
+
+ $date = Date::factory($time);
$dateTimeProvider = StaticContainer::get('Piwik\Intl\Data\Provider\DateTimeFormatProvider');
if ($dateTimeProvider->uses12HourClock()) {