We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 20d3fb1 commit 4bdf3bfCopy full SHA for 4bdf3bf
app/Traits/ManagesJobBans.php
@@ -26,7 +26,10 @@ private function addJobBan(StoreRequest $request)
26
27
$expiresAt = null;
28
if ($data->has('duration')) {
29
- $expiresAt = Carbon::now()->addSeconds($data['duration']);
+ $duration = (int) $data['duration'];
30
+ if ($duration > 0) {
31
+ $expiresAt = Carbon::now()->addSeconds($duration);
32
+ }
33
}
34
35
$gameAdmin = $request->getGameAdmin();
0 commit comments