Skip to content

Commit

Permalink
Merge pull request #17 from joanhey/cookie
Browse files Browse the repository at this point in the history
Add info message
  • Loading branch information
joanhey authored Dec 23, 2022
2 parents fd09a72 + 8cf4cd1 commit f40c218
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/AdapterFunctions.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,14 @@ function http_response_code(int $code = null): int
*/
function setcookie(string $name, string $value = '', int|array $expires = 0, string $path = '', string $domain = '', bool $secure = FALSE, bool $httponly = FALSE): bool
{
if (is_array($expires)) {
if (is_array($expires)) { // Alternative signature available as of PHP 7.3.0 (not supported with named parameters)
$expires = $expires['expires'] ?? 0;
$path = $expires['path'] ?? '';
$domain = $expires['domain'] ?? '';
$secure = $expires['secure'] ?? FALSE;
$httponly = $expires['httponly'] ?? FALSE;
}

return Http::setcookie($name, $value, $expires, $path, $domain, $secure, $httponly);
}

Expand Down

0 comments on commit f40c218

Please sign in to comment.