-
-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cookie Unset Method #1
Comments
Hi @phpcodingmaster I'll check this out |
@phpcodingmaster I've so far been unable to replicate this issue. Just to confirm, are you submitting a response before checking to see if the cookie was unset? |
Hi @mychidarko Thanks for checking. Nope. |
PHP doesn't update the cookie values in your application until a response is sent to the client. Since Leaf's cookie module is built on PHP cookies, it also inherits that behavior |
Describe the bug
Cant remove a cookie with \Leaf\Http\Cookie::unset('cookiename');
Have to use alternative below.
To Reproduce
Steps to reproduce the behavior:
"expire" => time() + 86400, // Expire in 1 day
"httponly" => true,
"path" => "/"
]);
// Try to remove with the below, does not work!
\Leaf\Http\Cookie::unset('cookie');
However, the below removes the cookie. Changiing the expire time to be less than before.
This works, but it just looks ugly compared to doing this -> \Leaf\Http\Cookie::unset('cookie');
Expected behavior
Cookie should be removed with \Leaf\Http\Cookie::unset('cookie');
The text was updated successfully, but these errors were encountered: