IdnaConverter repository changed url
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
@@ -43,10 +43,10 @@
|
|||||||
"ext-curl": "*",
|
"ext-curl": "*",
|
||||||
"ext-json": "*",
|
"ext-json": "*",
|
||||||
"ext-openssl": "*",
|
"ext-openssl": "*",
|
||||||
"mso/idna-convert": "1.*",
|
|
||||||
"phpmailer/phpmailer": "~6.0",
|
"phpmailer/phpmailer": "~6.0",
|
||||||
"monolog/monolog": "^1.24",
|
"monolog/monolog": "^1.24",
|
||||||
"robthree/twofactorauth": "^1.6"
|
"robthree/twofactorauth": "^1.6",
|
||||||
|
"algo26-matthias/idna-convert": "^2.1"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpunit/phpunit": "6.5.13",
|
"phpunit/phpunit": "6.5.13",
|
||||||
|
|||||||
2994
composer.lock
generated
Normal file
2994
composer.lock
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -40,7 +40,7 @@ class IdnaWrapper
|
|||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
// Instantiate it
|
// Instantiate it
|
||||||
$this->idna_converter = new \Mso\IdnaConvert\IdnaConvert();
|
$this->idna_converter = new \Algo26\IdnaConvert\IdnaConvert();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -59,9 +59,7 @@ class IdnaWrapper
|
|||||||
try {
|
try {
|
||||||
return $this->idna_converter->encode($to_encode);
|
return $this->idna_converter->encode($to_encode);
|
||||||
} catch (\InvalidArgumentException $iae) {
|
} catch (\InvalidArgumentException $iae) {
|
||||||
// dirty hack because Mso\IdnaConvert does not specify error-numbers
|
if ($iae->getCode() == 100) {
|
||||||
// see https://github.com/phlylabs/idna-convert/issues/11
|
|
||||||
if (strtolower($iae->getMessage()) == 'this is already a punycode string') {
|
|
||||||
return $to_encode;
|
return $to_encode;
|
||||||
}
|
}
|
||||||
throw $iae;
|
throw $iae;
|
||||||
|
|||||||
Reference in New Issue
Block a user