Skip to content

Commit 714becc

Browse files
Merge branch '6.4' into 7.1
* 6.4: initialize RedisAdapter cursor to 0 do not skip tests from data providers ensure compatibility with Twig 3.15 [Mime] fix encoding issue with UTF-8 addresses containing doubles spaces fix translation file syntax [Notifier] Improve Telegrams markdown escaping [Validator] [Choice] Fix callback option if not array returned [DependencyInjection] Fix linting factories implemented via __callStatic [DependencyInjection] Fix replacing abstract arguments with bindings Minor fixes around parse_url() checks Ensure compatibility with mongodb v2 Add missing translations for Turkish (tr)
2 parents af38cce + 65d4b3f commit 714becc

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

AbstractBrowser.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -337,11 +337,11 @@ public function request(string $method, string $uri, array $parameters = [], arr
337337

338338
$server = array_merge($this->server, $server);
339339

340-
if (!empty($server['HTTP_HOST']) && null === parse_url($originalUri, \PHP_URL_HOST)) {
340+
if (!empty($server['HTTP_HOST']) && !parse_url($originalUri, \PHP_URL_HOST)) {
341341
$uri = preg_replace('{^(https?\://)'.preg_quote($this->extractHost($uri)).'}', '${1}'.$server['HTTP_HOST'], $uri);
342342
}
343343

344-
if (isset($server['HTTPS']) && null === parse_url($originalUri, \PHP_URL_SCHEME)) {
344+
if (isset($server['HTTPS']) && !parse_url($originalUri, \PHP_URL_SCHEME)) {
345345
$uri = preg_replace('{^'.parse_url($uri, \PHP_URL_SCHEME).'}', $server['HTTPS'] ? 'https' : 'http', $uri);
346346
}
347347

Cookie.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ public static function fromString(string $cookie, ?string $url = null): static
146146
];
147147

148148
if (null !== $url) {
149-
if ((false === $urlParts = parse_url($url)) || !isset($urlParts['host'])) {
149+
if (false === ($urlParts = parse_url($url)) || !isset($urlParts['host'])) {
150150
throw new InvalidArgumentException(sprintf('The URL "%s" is not valid.', $url));
151151
}
152152

@@ -159,7 +159,7 @@ public static function fromString(string $cookie, ?string $url = null): static
159159

160160
if ('secure' === strtolower($part)) {
161161
// Ignore the secure flag if the original URI is not given or is not HTTPS
162-
if (!$url || !isset($urlParts['scheme']) || 'https' !== $urlParts['scheme']) {
162+
if (null === $url || !isset($urlParts['scheme']) || 'https' !== $urlParts['scheme']) {
163163
continue;
164164
}
165165

0 commit comments

Comments
 (0)