MINOR add a little extra checking to avoid a crash

This commit is contained in:
Tom Rix 2010-02-21 20:07:09 +00:00
parent cda1cd9bd1
commit e0fa54c7bb

View File

@ -88,7 +88,7 @@ class PagesDueForReviewReport extends SS_Report {
if(empty($params['ReviewDateBefore']) && empty($params['ReviewDateAfter'])) { if(empty($params['ReviewDateBefore']) && empty($params['ReviewDateAfter'])) {
// If there's no review dates set, default to all pages due for review now // If there's no review dates set, default to all pages due for review now
$wheres[] = 'NextReviewDate < \'' . SSDatetime::now()->URLDate() . '\' + INTERVAL 1 DAY'; $wheres[] = 'NextReviewDate < \'' . (class_exists('SS_Datetime') ? SS_Datetime::now()->URLDate() : SSDatetime::now()->URLDate()) . '\' + INTERVAL 1 DAY';
} else { } else {
// Review date before // Review date before
if(!empty($params['ReviewDateBefore'])) { if(!empty($params['ReviewDateBefore'])) {