Skip to content

Conversation

Zaglov
Copy link

@Zaglov Zaglov commented Oct 6, 2024

Added an additional check to prevent warnings thrown in HttpClient if the $errors array is empty.

Added an additional check to prevent warnings thrown in HttpClient if the $errors array is empty.
@@ -372,7 +372,7 @@ protected function lookForErrors($parsedResponse)
$errorMessage = '';
$errorCode = '';

if (is_array($errors)) {
if (is_array($errors) && !empty($errors)) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (is_array($errors) && !empty($errors)) {
if (is_array($errors) && $errors) {

suffices.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants