Skip to content
This repository has been archived by the owner on Sep 30, 2020. It is now read-only.

Commit

Permalink
always return array or string instead of void (#26)
Browse files Browse the repository at this point in the history
  • Loading branch information
lasergoat authored and tuurbo committed Sep 19, 2017
1 parent 0b3a753 commit 4ec4f53
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ public function paymentToken()
public function errors($string = false)
{
if (!isset($this->response['errors'])) {
return;
return $string ? '' : [];
}

$errors = is_array($this->response['errors']) ? $this->response['errors'] : [$this->response['errors']];
Expand Down

0 comments on commit 4ec4f53

Please sign in to comment.