Skip to content

Commit

Permalink
Fixed issue #41 with mixed up parameters in str_contains() function i…
Browse files Browse the repository at this point in the history
…n ToIdn.php (#42)
  • Loading branch information
MakarMS authored Sep 15, 2023
1 parent a739f3f commit 047d7ff
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/ToIdn.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ public function convert(string $host): string
return $host;
}

if (str_contains('/', $host)
|| str_contains(':', $host)
|| str_contains('?', $host)
|| str_contains('@', $host)
if (str_contains($host, '/')
|| str_contains($host, ':')
|| str_contains($host, '?')
|| str_contains($host, '@')
) {
throw new InvalidCharacterException('Neither email addresses nor URLs are allowed', 205);
}
Expand Down

0 comments on commit 047d7ff

Please sign in to comment.