function CookieJar::removeCookieIfEmpty
If a cookie already exists and the server asks to set it again with a null value, the cookie must be deleted.
1 call to CookieJar::removeCookieIfEmpty()
- CookieJar::setCookie in vendor/
guzzlehttp/ guzzle/ src/ Cookie/ CookieJar.php - Sets a cookie in the cookie jar.
File
-
vendor/
guzzlehttp/ guzzle/ src/ Cookie/ CookieJar.php, line 296
Class
- CookieJar
- Cookie jar that stores cookies as an array
Namespace
GuzzleHttp\CookieCode
private function removeCookieIfEmpty(SetCookie $cookie) : void {
$cookieValue = $cookie->getValue();
if ($cookieValue === null || $cookieValue === '') {
$this->clear($cookie->getDomain(), $cookie->getPath(), $cookie->getName());
}
}