IdnaConverter repository changed url

Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann
2019-03-10 17:13:51 +01:00
parent b1bbb1847d
commit f7d24e8870
3 changed files with 2998 additions and 6 deletions

View File

@@ -40,7 +40,7 @@ class IdnaWrapper
public function __construct()
{
// Instantiate it
$this->idna_converter = new \Mso\IdnaConvert\IdnaConvert();
$this->idna_converter = new \Algo26\IdnaConvert\IdnaConvert();
}
/**
@@ -59,9 +59,7 @@ class IdnaWrapper
try {
return $this->idna_converter->encode($to_encode);
} catch (\InvalidArgumentException $iae) {
// dirty hack because Mso\IdnaConvert does not specify error-numbers
// see https://github.com/phlylabs/idna-convert/issues/11
if (strtolower($iae->getMessage()) == 'this is already a punycode string') {
if ($iae->getCode() == 100) {
return $to_encode;
}
throw $iae;