diff --git a/nag/lib/Nag.php b/nag/lib/Nag.php index dea081fed60..aa1212e358d 100644 --- a/nag/lib/Nag.php +++ b/nag/lib/Nag.php @@ -1565,10 +1565,10 @@ public static function _rsortByEstimate($a, $b) */ public static function _sortByDue($a, $b) { - $a_due = empty($a->due) + $a_due = empty($a->getNextDue()) ? 0 : $a->getNextDue()->timestamp(); - $b_due = empty($b->due) + $b_due = empty($b->getNextDue()) ? 0 : $b->getNextDue()->timestamp();