Skip to content

Commit

Permalink
Catch the right exception when IDN is not available
Browse files Browse the repository at this point in the history
  • Loading branch information
kelunik committed Jul 12, 2017
1 parent 6a046eb commit 6557178
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Internal/PublicSuffixList.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Amp\Artax\Internal;

use Amp\Dns\InvalidNameError;
use Amp\Uri\InvalidDnsNameException;
use function Amp\Uri\normalizeDnsName;

/** @internal */
Expand Down Expand Up @@ -57,7 +57,7 @@ private static function readList() {
} else {
$rules[] = self::toRegex($rule, false);
}
} catch (InvalidNameError $e) {
} catch (InvalidDnsNameException $e) {
// ignore IDN rules if no IDN support is available
// requests with IDNs will fail anyway then
}
Expand Down

0 comments on commit 6557178

Please sign in to comment.