Skip to content

Commit 195cde3

Browse files
committed
patchin idn_to_utf8
1 parent e3a8161 commit 195cde3

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Pdp/Parser.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,11 @@ protected function normalize($part)
337337
protected function denormalize($part)
338338
{
339339
if ($this->isNormalized === true) {
340-
$part = idn_to_utf8($part);
340+
if (defined('INTL_IDNA_VARIANT_UTS46')) {
341+
$part = idn_to_utf8($part, 0, INTL_IDNA_VARIANT_UTS46);
342+
} else {
343+
$part = idn_to_utf8($part);
344+
}
341345
$this->isNormalized = false;
342346
}
343347

0 commit comments

Comments
 (0)