: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
// Default path normalization as per RFC 6265 section 5.1.4
if (substr($path, 0, 1) !== '/') {
// If the uri-path is empty or if the first character of
// the uri-path is not a %x2F ("/") character, output
// %x2F ("/") and skip the remaining steps.
} elseif (substr_count($path, '/') === 1) {
// If the uri-path contains no more than one %x2F ("/")
// character, output %x2F ("/") and skip the remaining
// Output the characters of the uri-path from the first
// character up to, but not including, the right-most
$path = substr($path, 0, strrpos($path, '/'));
$parsed->attributes['path'] = $path;
// Reject invalid cookie domains
if (!empty($origin) && !$parsed->domain_matches($origin->host)) {
$cookies[$parsed->name] = $parsed;