Skip to content

Commit 4bdf3bf

Browse files
Fix jobban duration (#112)
1 parent 20d3fb1 commit 4bdf3bf

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

app/Traits/ManagesJobBans.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,10 @@ private function addJobBan(StoreRequest $request)
2626

2727
$expiresAt = null;
2828
if ($data->has('duration')) {
29-
$expiresAt = Carbon::now()->addSeconds($data['duration']);
29+
$duration = (int) $data['duration'];
30+
if ($duration > 0) {
31+
$expiresAt = Carbon::now()->addSeconds($duration);
32+
}
3033
}
3134

3235
$gameAdmin = $request->getGameAdmin();

0 commit comments

Comments
 (0)