diff options
Diffstat (limited to 'plugins/VisitTime')
-rw-r--r-- | plugins/VisitTime/functions.php | 7 |
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()) { |