From 66680c665a2d62970da4a11bbd8fc4fbc0f0d0ed Mon Sep 17 00:00:00 2001 From: Aaron Piotrowski Date: Tue, 7 Feb 2023 18:38:05 -0600 Subject: [PATCH] Change condition to assert $pieces[1] is set for Psalm --- src/Cookie/ResponseCookie.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Cookie/ResponseCookie.php b/src/Cookie/ResponseCookie.php index 5acbfeb..355f8ad 100644 --- a/src/Cookie/ResponseCookie.php +++ b/src/Cookie/ResponseCookie.php @@ -55,7 +55,7 @@ public static function fromHeader(string $string): ?self $pieces = \array_map('trim', \explode('=', $part, 2)); $key = \strtolower($pieces[0]); - if (1 === \count($pieces)) { + if (\count($pieces) < 2) { switch ($key) { case 'secure': $meta = $meta->withSecure();