Skip to content

Commit 601ea1b

Browse files
committed
Merge branch 'master' of wirewraithgit:goonstation/goonhub
2 parents 03afcc9 + 4bdf3bf commit 601ea1b

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)