monitoring: Fix exception in the alert summary report when using the "One month" interval

fixes #8220
This commit is contained in:
Eric Lippmann 2015-02-02 14:28:47 +01:00
parent 52c40bdc5b
commit bfb2f710a1
1 changed files with 2 additions and 2 deletions

View File

@ -375,7 +375,7 @@ class Monitoring_AlertsummaryController extends Controller
$query->order('notification_start_time', 'asc');
$records = $query->getQuery()->fetchAll();
$records = $query->getQuery()->fetchAll();
$interval = $this->getInterval();
$period = $this->createPeriod($interval);
@ -582,7 +582,7 @@ class Monitoring_AlertsummaryController extends Controller
} elseif ($interval === '1w') {
return new DatePeriod($this->getBeginDate($interval), new DateInterval('P1D'), 7);
} elseif ($interval === '1m') {
return new DatePeriod($this->getBeginDate($interval), new DateInterval('P1D'), 30);
return new DatePeriod($this->getBeginDate($interval), new DateInterval('P1D'), 31);
} elseif ($interval === '1y') {
return new DatePeriod($this->getBeginDate($interval), new DateInterval('P1M'), 12);
}