Skip to content

Commit

Permalink
reverse for PHP 8
Browse files Browse the repository at this point in the history
  • Loading branch information
mambax7 committed Dec 26, 2020
1 parent 19fc7b4 commit ea9be0f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions class/Utility.php
Original file line number Diff line number Diff line change
Expand Up @@ -833,8 +833,9 @@ public static function setCookieVar($name, $value, $time = 0)
if (0 === $time) {
$time = \time() + 3600 * 24 * 365;
}
// setcookie($name, $value, $time, '/');
setcookie($name, $value, $time, '/', ini_get('session.cookie_domain'), ini_get('session.cookie_secure'), ini_get('session.cookie_httponly'));
setcookie($name, $value, $time, '/');
// TODO in PHP 8 in below function, ini_get('session.cookie_secure') comes back as "0" instead of false, and it generates error: TypeError: setcookie(): Argument #6 ($secure) must be of type bool, string given
// setcookie($name, $value, $time, '/', ini_get('session.cookie_domain'), ini_get('session.cookie_secure')??false, ini_get('session.cookie_httponly')??false);
}

/**
Expand Down

0 comments on commit ea9be0f

Please sign in to comment.