@@ -530,20 +530,16 @@ public static function setCookie(
530530 $ secure = HTTPS ;
531531 }
532532
533- $ gLogger ->info ('Set Cookie! ' , array ('name ' => $ name , 'value ' => $ value , 'expire ' => $ expire , 'path ' => $ path , 'domain ' => $ domain , 'secure ' => $ secure , 'httpOnly ' => $ httpOnly , 'sameSite ' => 'lax ' ));
534-
535- if (PHP_VERSION_ID < 70300 ) {
536- return setcookie ($ name , $ value , $ expire , $ path . ';samesite=lax ' , $ domain , $ secure , $ httpOnly );
537- } else {
538- return setcookie ($ name , $ value , array (
539- 'expires ' => $ expire ,
540- 'path ' => $ path ,
541- 'domain ' => $ domain ,
542- 'secure ' => $ secure ,
543- 'httponly ' => $ httpOnly ,
544- 'samesite ' => 'lax '
545- ));
546- }
533+ $ gLogger ->info ('Set Cookie! ' , array ('name ' => $ name , 'expire ' => $ expire , 'path ' => $ path , 'domain ' => $ domain , 'secure ' => $ secure , 'httpOnly ' => $ httpOnly , 'sameSite ' => 'lax ' ));
534+
535+ return setcookie ($ name , $ value , array (
536+ 'expires ' => $ expire ,
537+ 'path ' => $ path ,
538+ 'domain ' => $ domain ,
539+ 'secure ' => $ secure ,
540+ 'httponly ' => $ httpOnly ,
541+ 'samesite ' => 'lax '
542+ ));
547543 }
548544
549545 /**
@@ -594,27 +590,23 @@ public static function start(string $cookiePrefix, int $limit = 0, string $path
594590 $ secure = HTTPS ;
595591 }
596592
597- if (PHP_VERSION_ID < 70300 ) {
598- session_set_cookie_params ($ limit , $ path . ';samesite=lax ' , $ domain , $ secure , $ httpOnly );
599- } else {
600- session_set_cookie_params (array (
601- 'lifetime ' => $ limit ,
602- 'path ' => $ path ,
603- 'domain ' => $ domain ,
604- 'secure ' => $ secure ,
605- 'httponly ' => $ httpOnly ,
606- 'samesite ' => 'lax '
607- ));
608- }
593+ session_set_cookie_params (array (
594+ 'lifetime ' => $ limit ,
595+ 'path ' => $ path ,
596+ 'domain ' => $ domain ,
597+ 'secure ' => $ secure ,
598+ 'httponly ' => $ httpOnly ,
599+ 'samesite ' => 'lax '
600+ ));
609601
610602 if (session_status () === PHP_SESSION_ACTIVE ) {
611- $ gLogger ->notice ('Session is already started! ' , array ( ' sessionId ' => session_id ()) );
603+ $ gLogger ->notice ('Session is already started! ' );
612604 }
613605
614606 // Start session
615607 session_start ();
616608
617- $ gLogger ->info ('Session Started! ' , array ('name ' => $ sessionName , 'limit ' => $ limit , 'path ' => $ path , 'domain ' => $ domain , 'secure ' => $ secure , 'httpOnly ' => $ httpOnly , 'sameSite ' => 'lax ' , ' sessionId ' => session_id () ));
609+ $ gLogger ->info ('Session Started! ' , array ('name ' => $ sessionName , 'limit ' => $ limit , 'path ' => $ path , 'domain ' => $ domain , 'secure ' => $ secure , 'httpOnly ' => $ httpOnly , 'sameSite ' => 'lax ' ));
618610 }
619611
620612 /**
0 commit comments