@@ 14,6 14,10 @@ final class Cookie
$parts = explode(';', $cookieString);
$nameAndValue = explode('=', $parts[0]);
+ if (!isset($parts[1])) {
+ throw new \Exception(sprintf('Unable to parse cookie string: %s', $cookieString));
+ }
+
return new self($nameAndValue[0], $nameAndValue[1]);
}