Skip to content

Commit

Permalink
Cast JWT_TTL value to integer in config.php if sourced from environm…
Browse files Browse the repository at this point in the history
…ent 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 tymondesigns#3 ($value) must be of type int|float, string given,
```
will appear

Fixes tymondesigns#2256
  • Loading branch information
D-Redouane authored Apr 29, 2024
1 parent 51620eb commit 4c14ddb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion config/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
|
*/

'ttl' => env('JWT_TTL', 60),
'ttl' => (int) env('JWT_TTL', 60),

/*
|--------------------------------------------------------------------------
Expand Down

0 comments on commit 4c14ddb

Please sign in to comment.