Fix wrong timestamp generation when invalid archive dates are submitted, thanks to Deminy

This commit is contained in:
Garvin Hicking 2007-06-18 11:57:15 +00:00
parent 0447681d2d
commit f82e869799

View File

@ -145,6 +145,18 @@ if (preg_match(PAT_ARCHIVES, $uri, $matches) || isset($serendipity['GET']['range
$serendipity['GET']['hidefooter'] = null;
}
if (isset($year) && !is_numeric($year)) {
$year = date('Y');
}
if (isset($month) && !is_numeric($month)) {
$month = date('m');
}
if (isset($day) && !is_numeric($day)) {
$day = date('d');
}
switch($serendipity['calendar']) {
case 'gregorian':
default: