From 4c14ddb667a3924ba84641e6dd9e8c430701d41d Mon Sep 17 00:00:00 2001 From: Redouane DADDIOUAMER <94105088+D-Redouane@users.noreply.github.com> Date: Mon, 29 Apr 2024 16:50:18 +0100 Subject: [PATCH] Cast JWT_TTL value to integer in config.php if sourced from environment variable The env file is passing values as string and if manually the developer set the JWT_TTL value in the env file an error of : ``` Carbon\\Carbon::rawAddUnit(): Argument #3 ($value) must be of type int|float, string given, ``` will appear Fixes #2256 --- config/config.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/config.php b/config/config.php index f83234d1..09a3342e 100644 --- a/config/config.php +++ b/config/config.php @@ -101,7 +101,7 @@ | */ - 'ttl' => env('JWT_TTL', 60), + 'ttl' => (int) env('JWT_TTL', 60), /* |--------------------------------------------------------------------------