Skip to content

Commit 2e191e8

Browse files
committed
refactor: check empty string on ResponseTrait
1 parent 6095b0a commit 2e191e8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

system/HTTP/ResponseTrait.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -566,7 +566,7 @@ public function getCookieStore()
566566
*/
567567
public function hasCookie(string $name, ?string $value = null, string $prefix = ''): bool
568568
{
569-
$prefix = $prefix !== '' && $prefix !== '0' ? $prefix : Cookie::setDefaults()['prefix']; // to retain BC
569+
$prefix = $prefix !== '' ? $prefix : Cookie::setDefaults()['prefix']; // to retain BC
570570

571571
return $this->cookieStore->has($name, $prefix, $value);
572572
}
@@ -586,7 +586,7 @@ public function getCookie(?string $name = null, string $prefix = '')
586586
}
587587

588588
try {
589-
$prefix = $prefix !== '' && $prefix !== '0' ? $prefix : Cookie::setDefaults()['prefix']; // to retain BC
589+
$prefix = $prefix !== '' ? $prefix : Cookie::setDefaults()['prefix']; // to retain BC
590590

591591
return $this->cookieStore->get($name, $prefix);
592592
} catch (CookieException $e) {
@@ -607,7 +607,7 @@ public function deleteCookie(string $name = '', string $domain = '', string $pat
607607
return $this;
608608
}
609609

610-
$prefix = $prefix !== '' && $prefix !== '0' ? $prefix : Cookie::setDefaults()['prefix']; // to retain BC
610+
$prefix = $prefix !== '' ? $prefix : Cookie::setDefaults()['prefix']; // to retain BC
611611

612612
$prefixed = $prefix . $name;
613613
$store = $this->cookieStore;

0 commit comments

Comments
 (0)