Skip to content

Commit

Permalink
Fix illegal argument exception logic
Browse files Browse the repository at this point in the history
  • Loading branch information
zstein-holts committed Mar 10, 2020
1 parent 233bc49 commit df8533b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Personator.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public function __construct(string $licenseKey) {
* @throws InvalidArgumentException
*/
public function doRequest(array $actions, array $addressParams) {
if (count($actions) != 0 && count($actions) == count(array_intersect($actions, $this->validActions))) {
if (count($actions) === 0 || (count($actions) != count(array_intersect($actions, $this->validActions))) ) {
throw new InvalidArgumentException("Actions may only be one or more of: " . implode(',',$this->validActions));
}
// Instantiate a GuzzleHttp client
Expand Down

0 comments on commit df8533b

Please sign in to comment.