MINOR Fixed undefined Month in ArchiveWidget

This commit is contained in:
Sean Harvey 2009-08-04 02:18:38 +00:00
parent 1a2e2a1d98
commit 56be6ad6fa

View File

@ -88,7 +88,7 @@ class ArchiveWidget extends Widget {
if($sqlResults) foreach($sqlResults as $sqlResult) { if($sqlResults) foreach($sqlResults as $sqlResult) {
$isMonthDisplay = $this->DisplayMode == 'month'; $isMonthDisplay = $this->DisplayMode == 'month';
$monthVal = ($sqlResult['Month']) ? (int) $sqlResult['Month'] : 1; $monthVal = (isset($sqlResult['Month'])) ? (int) $sqlResult['Month'] : 1;
$month = ($isMonthDisplay) ? $monthVal : 1; $month = ($isMonthDisplay) ? $monthVal : 1;
$year = ($sqlResult['Year']) ? (int) $sqlResult['Year'] : date('Y'); $year = ($sqlResult['Year']) ? (int) $sqlResult['Year'] : date('Y');