Skip to content

Commit 5a80282

Browse files
committed
Do not use deprecated variant
1 parent 1936918 commit 5a80282

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Pdp/Parser.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ protected function normalize($part)
303303
$punycoded = (strpos($part, 'xn--') !== false);
304304

305305
if ($punycoded === false) {
306-
$part = idn_to_ascii($part);
306+
$part = idn_to_ascii($part, 0, INTL_IDNA_VARIANT_UTS46);
307307
$this->isNormalized = true;
308308
}
309309

src/Pdp/PublicSuffixListManager.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ public function buildArray(array &$publicSuffixListArray, array $ruleParts)
141141
// of https://publicsuffix.org/list/
142142
// "The domain and all rules must be canonicalized in the normal way
143143
// for hostnames - lower-case, Punycode (RFC 3492)."
144-
$part = idn_to_ascii($part);
144+
$part = idn_to_ascii($part, 0, INTL_IDNA_VARIANT_UTS46);
145145

146146
if (strpos($part, '!') === 0) {
147147
$part = substr($part, 1);

0 commit comments

Comments
 (0)