Skip to content

Commit

Permalink
Closes agnostack#181
Browse files Browse the repository at this point in the history
  • Loading branch information
m-overlund committed Mar 30, 2023
1 parent 091c813 commit 1a617ec
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/app/code/community/Zendesk/Zendesk/Model/Api/Tickets.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ public function forOrder($orderIncrementId)
)
);

if(count($response['results'])) {
// Check if $response['results'] is set and is an array before calling count()
if (isset($response['results']) && is_array($response['results']) && count($response['results'])) {
return $response['results'];
} else {
return false;
Expand Down

0 comments on commit 1a617ec

Please sign in to comment.