File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -21,14 +21,14 @@ public function __construct(array $config = [])
2121
2222 $ options = [
2323 'parameters ' => [
24- 'password ' => $ config ['password ' ] ?? getenv ('REDIS_PASSWORD ' ) ?? '' ,
25- 'database ' => $ config ['database ' ] ?? getenv ('REDIS_DB ' ) ?? 0 ,
24+ 'password ' => $ config ['password ' ] ?? getenv ('REDIS_PASSWORD ' ) ?: '' ,
25+ 'database ' => $ config ['database ' ] ?? getenv ('REDIS_DB ' ) ?: 0 ,
2626 ],
2727 ];
2828 $ this ->client = new Client ([
2929 'scheme ' => 'tcp ' ,
30- 'host ' => $ config ['host ' ] ?? getenv ('REDIS_HOST ' ) ?? '127.0.0.1 ' ,
31- 'port ' => $ config ['port ' ] ?? getenv ('REDIS_PORT ' ) ?? 6379 ,
30+ 'host ' => $ config ['host ' ] ?? getenv ('REDIS_HOST ' ) ?: '127.0.0.1 ' ,
31+ 'port ' => $ config ['port ' ] ?? getenv ('REDIS_PORT ' ) ?: 6379 ,
3232 ], $ options );
3333 }
3434
You can’t perform that action at this time.
0 commit comments