Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. CookieJar.php

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\Cookie

Code

private function removeCookieIfEmpty(SetCookie $cookie) : void {
    $cookieValue = $cookie->getValue();
    if ($cookieValue === null || $cookieValue === '') {
        $this->clear($cookie->getDomain(), $cookie->getPath(), $cookie->getName());
    }
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal