I extendByHourse method

This commit is contained in:
Fabian @ Blax Software 2026-03-09 13:17:02 +01:00
parent 2ce9893e81
commit 2f19523dcf
1 changed files with 1 additions and 1 deletions

View File

@ -24,7 +24,7 @@ trait WillExpire
if ($this->expires_at === null && !$expire_if_null) {
// Do not add expiration if it does not expire
return;
} elseif ($this->expires_at->isPast()) {
} elseif ($this->expires_at === null || $this->expires_at->isPast()) {
$this->expires_at = now()->addHours($hours);
} else {
$this->expires_at = $this->expires_at->addHours($hours);