Skip to content

Commit f80ccb2

Browse files
Merge branch '5.0'
* 5.0: (36 commits) Add test for tagged iterator with numeric index Fix container lint command when a synthetic service is used in combination with the expression language Fix Travis script [Validator][Range] Fix typos [SecurityBundle] Minor fix in LDAP config tree builder [HttpClient] fix requests to hosts that idn_to_ascii() cannot handle Revert "minor #35559 [FrameworkBundle] remove mention of the old Controller class (nicolas-grekas)" [FrameworkBundle] remove redundant PHPDoc in console Descriptor and subclass [Mime] remove phpdoc mentioning Utf8AddressEncoder Add missing phpdoc Remove int return type from FlattenException::getCode [Yaml] fix dumping strings containing CRs [DI] Fix XmlFileLoader bad error message [Form] Handle false as empty value on expanded choices [Messenger] Add ext-redis min version req to tests Tweak message improve PlaintextPasswordEncoder docBlock summary [Validator] Add two missing translations for the Arabic (ar) locale Use some PHP 5.4 constants unconditionally Add new packages on the link script ...
2 parents 3846a7f + ef502e4 commit f80ccb2

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

HttpClientTrait.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -455,10 +455,7 @@ private static function parseUrl(string $url, array $query = [], array $allowedS
455455
throw new InvalidArgumentException(sprintf('Unsupported IDN "%s", try enabling the "intl" PHP extension or running "composer require symfony/polyfill-intl-idn".', $host));
456456
}
457457

458-
if (false === $host = \defined('INTL_IDNA_VARIANT_UTS46') ? idn_to_ascii($host, IDNA_DEFAULT, INTL_IDNA_VARIANT_UTS46) : strtolower($host)) {
459-
throw new InvalidArgumentException(sprintf('Unsupported host in "%s".', $url));
460-
}
461-
458+
$host = \defined('INTL_IDNA_VARIANT_UTS46') ? idn_to_ascii($host, IDNA_DEFAULT, INTL_IDNA_VARIANT_UTS46) ?: strtolower($host) : strtolower($host);
462459
$host .= $port ? ':'.$port : '';
463460
}
464461

0 commit comments

Comments
 (0)