File tree Expand file tree Collapse file tree 2 files changed +23
-1
lines changed
tests/system/Session/Handlers/Database Expand file tree Collapse file tree 2 files changed +23
-1
lines changed Original file line number Diff line number Diff line change @@ -142,7 +142,7 @@ protected function setSavePath(): void
142142 }
143143 }
144144
145- $ persistent = isset ($ query ['persistent ' ]) ? (bool ) $ query ['persistent ' ] : null ;
145+ $ persistent = filter_var ($ query ['persistent ' ], FILTER_VALIDATE_BOOLEAN ) ? (bool ) $ query ['persistent ' ] : null ;
146146 $ password = $ query ['auth ' ] ?? null ;
147147 $ database = isset ($ query ['database ' ]) ? (int ) $ query ['database ' ] : 0 ;
148148 $ timeout = isset ($ query ['timeout ' ]) ? (float ) $ query ['timeout ' ] : 0.0 ;
Original file line number Diff line number Diff line change @@ -261,6 +261,28 @@ public static function provideSetSavePath(): iterable
261261 'persistent ' => false ,
262262 ],
263263 ],
264+ 'persistent connection with true ' => [
265+ 'tcp://127.0.0.1:6379?timeout=10&persistent=true ' ,
266+ [
267+ 'host ' => 'tcp://127.0.0.1 ' ,
268+ 'port ' => 6379 ,
269+ 'password ' => null ,
270+ 'database ' => 0 ,
271+ 'timeout ' => 10.0 ,
272+ 'persistent ' => true ,
273+ ],
274+ ],
275+ 'persistent connection with false ' => [
276+ 'tcp://127.0.0.1:6379?timeout=10&persistent=false ' ,
277+ [
278+ 'host ' => 'tcp://127.0.0.1 ' ,
279+ 'port ' => 6379 ,
280+ 'password ' => null ,
281+ 'database ' => 0 ,
282+ 'timeout ' => 10.0 ,
283+ 'persistent ' => false ,
284+ ],
285+ ],
264286 ];
265287 }
266288}
You can’t perform that action at this time.
0 commit comments