mirror of
https://github.com/silverstripe/silverstripe-contentreview
synced 2024-10-22 17:05:47 +02:00
MINOR add a little extra checking to avoid a crash
This commit is contained in:
parent
cda1cd9bd1
commit
e0fa54c7bb
@ -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'])) {
|
||||||
|
Loading…
Reference in New Issue
Block a user