Skip to content

Commit

Permalink
Ensure int type of getSeconds() output (#41623)
Browse files Browse the repository at this point in the history
  • Loading branch information
kylekatarnls committed Mar 23, 2022
1 parent d53b1ad commit 447f620
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Illuminate/Cache/Repository.php
Expand Up @@ -529,7 +529,7 @@ protected function getSeconds($ttl)
$duration = Carbon::now()->diffInRealSeconds($duration, false);
}

return (int) $duration > 0 ? $duration : 0;
return (int) ($duration > 0 ? $duration : 0);
}

/**
Expand Down

0 comments on commit 447f620

Please sign in to comment.