Check if date time is before correctly

This commit is contained in:
Keir Nellyer 2016-06-30 17:40:12 -04:00
parent 7db7c0914e
commit 164d1c580d

View File

@ -51,7 +51,7 @@
foreach ($this->reporters as $reason)
{
// TODO: confirm this does indeed get the oldest report
if ($oldestReason == null || $reason->getTime()->diff($oldestReason->getTime()) < 0)
if ($oldestReason == null || !$reason->getTime()->diff($oldestReason->getTime())->invert)
{
$oldestReason = $reason;
}