File tree Expand file tree Collapse file tree 2 files changed +2
-24
lines changed Expand file tree Collapse file tree 2 files changed +2
-24
lines changed Original file line number Diff line number Diff line change @@ -273,19 +273,7 @@ public function setCookie(
273273 'httponly ' => $ httpOnly ?? true ,
274274 'samesite ' => $ sameSite = ($ sameSite ?? self ::SAME_SITE_LAX ),
275275 ];
276- if (PHP_VERSION_ID >= 70300 ) {
277- setcookie ($ name , $ value , $ options );
278- } else {
279- setcookie (
280- $ name ,
281- $ value ,
282- $ options ['expires ' ],
283- $ options ['path ' ] . ($ sameSite ? "; SameSite= $ sameSite " : '' ),
284- $ options ['domain ' ],
285- $ options ['secure ' ],
286- $ options ['httponly ' ],
287- );
288- }
276+ setcookie ($ name , $ value , $ options );
289277 return $ this ;
290278 }
291279
Original file line number Diff line number Diff line change @@ -403,17 +403,7 @@ private function configure(array $config): void
403403 }
404404
405405 if ($ cookie !== $ origCookie ) {
406- if (PHP_VERSION_ID >= 70300 ) {
407- @session_set_cookie_params ($ cookie ); // @ may trigger warning when session is active since PHP 7.2
408- } else {
409- @session_set_cookie_params ( // @ may trigger warning when session is active since PHP 7.2
410- $ cookie ['lifetime ' ],
411- $ cookie ['path ' ] . (isset ($ cookie ['samesite ' ]) ? '; SameSite= ' . $ cookie ['samesite ' ] : '' ),
412- $ cookie ['domain ' ],
413- $ cookie ['secure ' ],
414- $ cookie ['httponly ' ],
415- );
416- }
406+ @session_set_cookie_params ($ cookie ); // @ may trigger warning when session is active since PHP 7.2
417407 if (session_status () === PHP_SESSION_ACTIVE ) {
418408 $ this ->sendCookie ();
419409 }
You can’t perform that action at this time.
0 commit comments