Skip to content

Commit 447f620

Browse files
authored
Ensure int type of getSeconds() output (#41623)
1 parent d53b1ad commit 447f620

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Illuminate/Cache/Repository.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,7 @@ protected function getSeconds($ttl)
529529
$duration = Carbon::now()->diffInRealSeconds($duration, false);
530530
}
531531

532-
return (int) $duration > 0 ? $duration : 0;
532+
return (int) ($duration > 0 ? $duration : 0);
533533
}
534534

535535
/**

0 commit comments

Comments
 (0)