Skip to content

Commit 90a3bf1

Browse files
authored
Update FirstData.php
1 parent 0301c3b commit 90a3bf1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/VinceG/FirstDataApi/FirstData.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,7 @@ public function isError() {
553553
}
554554

555555
// Make sure the response does not have error in it
556-
if(!$response || !count($response)) {
556+
if(!$response || empty($response)) {
557557
return true;
558558
}
559559

@@ -782,7 +782,7 @@ public function getErrorMessage() {
782782
* @return mixed
783783
*/
784784
protected function getValueByKey($data, $key) {
785-
if(count($data)) {
785+
if(is_countable($data) && count($data) >= 1) {
786786
foreach($data as $k=>$each) {
787787
if($k==$key) {
788788
return $each;

0 commit comments

Comments
 (0)