Skip to content

Commit

Permalink
Allow empty type param
Browse files Browse the repository at this point in the history
  • Loading branch information
NateShoffner committed Jan 23, 2022
1 parent e44b922 commit ef99fda
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion request/User/UserHistoryRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function __construct(string $username, $type = '') // "" means empty stri
$this->username = $username;

if (null !== $type) {
if (!\in_array($type, ['anime', 'manga'])) {
if (!empty($type) && !\in_array($type, ['anime', 'manga'])) {
throw new \InvalidArgumentException(sprintf('Type %s is not valid', $type));
}

Expand Down

0 comments on commit ef99fda

Please sign in to comment.