From 4ec4f5368e753ff850685af734774ba5c2e51c25 Mon Sep 17 00:00:00 2001 From: Daniel Date: Tue, 19 Sep 2017 13:19:46 -0500 Subject: [PATCH] always return array or string instead of void (#26) --- src/Client.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Client.php b/src/Client.php index 3ac0504..c418de2 100644 --- a/src/Client.php +++ b/src/Client.php @@ -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']];