Hi,
I've noticed that confirmed and cancelled email confirmations are set to expired when try to getStatus() when they pass the time set up in the UI.
Changing the order of the condition solves this issue:
Before:
public function getStatus() {
if ($this->isExpired()) {
$status = 'expired';
}
elseif ($this->isCancelled()) {
$status = 'cancelled';
}
elseif ($this->isConfirmed()) {
$status = 'confirmed';
}
else {
$status = 'pending';
}
return $status;
}
After:
public function getStatus() {
if ($this->isCancelled()) {
$status = 'cancelled';
}
elseif ($this->isConfirmed()) {
$status = 'confirmed';
}
elseif ($this->isExpired()) {
$status = 'expired';
}
else {
$status = 'pending';
}
return $status;
}
Needs review
1.0
Code
The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.