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 @@ -270,6 +270,28 @@ public static function provideSetSavePath(): iterable
270270 'persistent ' => false ,
271271 ],
272272 ],
273+ 'persistent connection with true ' => [
274+ 'tcp://127.0.0.1:6379?timeout=10&persistent=true ' ,
275+ [
276+ 'host ' => 'tcp://127.0.0.1 ' ,
277+ 'port ' => 6379 ,
278+ 'password ' => null ,
279+ 'database ' => 0 ,
280+ 'timeout ' => 10.0 ,
281+ 'persistent ' => true ,
282+ ],
283+ ],
284+ 'persistent connection with false ' => [
285+ 'tcp://127.0.0.1:6379?timeout=10&persistent=false ' ,
286+ [
287+ 'host ' => 'tcp://127.0.0.1 ' ,
288+ 'port ' => 6379 ,
289+ 'password ' => null ,
290+ 'database ' => 0 ,
291+ 'timeout ' => 10.0 ,
292+ 'persistent ' => false ,
293+ ],
294+ ],
273295 ];
274296 }
275297}
You can’t perform that action at this time.
0 commit comments