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:
authormattab <matthieu.aubry@gmail.com>2013-12-11 05:47:21 +0400
committermattab <matthieu.aubry@gmail.com>2013-12-11 05:47:21 +0400
commit4726aa6ebb61b8b423deea779968bcab3b2051dd (patch)
treedab3645916271675c62bc5e7ac36d5ee8e9a1531 /plugins
parentefc5e7ba75410048df1d25d57cbf2321470458fd (diff)
Fix cron error when date is invalid
Diffstat (limited to 'plugins')
-rw-r--r--plugins/CoreAdminHome/CoreAdminHome.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/plugins/CoreAdminHome/CoreAdminHome.php b/plugins/CoreAdminHome/CoreAdminHome.php
index ca63983d01..9a5d9a50ae 100644
--- a/plugins/CoreAdminHome/CoreAdminHome.php
+++ b/plugins/CoreAdminHome/CoreAdminHome.php
@@ -117,7 +117,11 @@ class CoreAdminHome extends \Piwik\Plugin
foreach ($archiveTables as $table) {
$date = ArchiveTableCreator::getDateFromTableName($table);
list($year, $month) = explode('_', $date);
- ArchiveSelector::purgeOutdatedArchives(Date::factory("$year-$month-15"));
+
+ // Somehow we may have archive tables created with older dates, prevent exception from being thrown
+ if($year > 1990) {
+ ArchiveSelector::purgeOutdatedArchives(Date::factory("$year-$month-15"));
+ }
}
}