Skip to content

Commit

Permalink
Update types for setcookie parameters
Browse files Browse the repository at this point in the history
Add data type to every `setcookie` parameters to reflect its requirements
  • Loading branch information
jaroslavtyc authored Nov 13, 2023
1 parent 130d3e9 commit b13c9a0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions standard/standard_4.php
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,7 @@ function restore_include_path() {}
* setcookie successfully runs, it will return true.
* This does not indicate whether the user accepted the cookie.
*/
function setcookie(string $name, $value = "", $expires_or_options = 0, $path = "", $domain = "", $secure = false, $httponly = false): bool {}
function setcookie(string $name, string $value = "", int $expires_or_options = 0, string $path = "", string $domain = "", bool $secure = false, bool $httponly = false): bool {}

/**
* Send a cookie
Expand All @@ -626,7 +626,7 @@ function setcookie(string $name, $value = "", $expires_or_options = 0, $path = "
* This does not indicate whether the user accepted the cookie.
* @since 7.3
*/
function setcookie(string $name, $value = '', array $options = []): bool {}
function setcookie(string $name, string $value = '', array $options = []): bool {}

/**
* Send a cookie without urlencoding the cookie value
Expand Down

0 comments on commit b13c9a0

Please sign in to comment.