Skip to content

Commit 79ec7c4

Browse files
committed
Merge branch '6.4' into 7.3
* 6.4: fix test setup [Validator] Review Turkish translations [Validator] Review Croatian translations [Validator] Review translations for Polish (pl) use the empty string instead of null as an array offset Review translations for Chinese (zh_TW) [Serializer] Adjust ObjectNormalizerTest for the accessor method changes from #61097
2 parents 271459d + 67729f8 commit 79ec7c4

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

ResponseHeaderBag.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ public function getCacheControlDirective(string $key): bool|string|null
159159

160160
public function setCookie(Cookie $cookie): void
161161
{
162-
$this->cookies[$cookie->getDomain()][$cookie->getPath()][$cookie->getName()] = $cookie;
162+
$this->cookies[$cookie->getDomain() ?? ''][$cookie->getPath()][$cookie->getName()] = $cookie;
163163
$this->headerNames['set-cookie'] = 'Set-Cookie';
164164
}
165165

@@ -170,13 +170,13 @@ public function removeCookie(string $name, ?string $path = '/', ?string $domain
170170
{
171171
$path ??= '/';
172172

173-
unset($this->cookies[$domain][$path][$name]);
173+
unset($this->cookies[$domain ?? ''][$path][$name]);
174174

175-
if (empty($this->cookies[$domain][$path])) {
176-
unset($this->cookies[$domain][$path]);
175+
if (empty($this->cookies[$domain ?? ''][$path])) {
176+
unset($this->cookies[$domain ?? ''][$path]);
177177

178-
if (empty($this->cookies[$domain])) {
179-
unset($this->cookies[$domain]);
178+
if (empty($this->cookies[$domain ?? ''])) {
179+
unset($this->cookies[$domain ?? '']);
180180
}
181181
}
182182

0 commit comments

Comments
 (0)