Skip to content

Commit

Permalink
Bug fix for previous commit
Browse files Browse the repository at this point in the history
  • Loading branch information
alexissavin committed Dec 22, 2017
1 parent 04a6a83 commit 72ccbbb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Whois.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ public function lookup($query = '', $is_utf = true)
$query = trim($query);
$idn = new IdnaConvert();
if ($is_utf) {
$query = $idn->validate($query) ? $query : $idn->encode($query);
$query = preg_match('/(xn--)/', $query) ? $query :$idn->encode($query);
} else {
$query = $idn->validate(utf8_encode($query)) ? utf8_encode($query) : $idn->encode(utf8_encode($query));
$query = preg_match('/(xn--)/', $query) ? utf8_encode($query) : $idn->encode(utf8_encode($query));
}
// If domain to query was not set
if (!isset($query) || $query == '') {
Expand Down

0 comments on commit 72ccbbb

Please sign in to comment.