Skip to content

Commit 8d64d17

Browse files
Merge branch '7.1' into 7.2
* 7.1: 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 [DependencyInjection] Fix parsing nested AutowireInline attributes Minor fixes around parse_url() checks Ensure compatibility with mongodb v2 Add missing translations for Turkish (tr)
2 parents d748fcb + 714becc commit 8d64d17

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

AbstractBrowser.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -346,11 +346,11 @@ public function request(string $method, string $uri, array $parameters = [], arr
346346

347347
$server = array_merge($this->server, $server);
348348

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

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

Cookie.php

Lines changed: 2 additions & 2 deletions
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)