From b00987b735910680cd19b0e797c751d705482d59 Mon Sep 17 00:00:00 2001 From: Thomas Portelange Date: Wed, 2 Sep 2020 14:01:46 +0200 Subject: [PATCH] fix undefined index notice $body['records'] is only defined if entering the if clause and therefore the count on line 349 can cause undefined index errors --- src/BulkTools/HTTPBulkToolsResponse.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/BulkTools/HTTPBulkToolsResponse.php b/src/BulkTools/HTTPBulkToolsResponse.php index 72a99b6..ad830e3 100644 --- a/src/BulkTools/HTTPBulkToolsResponse.php +++ b/src/BulkTools/HTTPBulkToolsResponse.php @@ -346,7 +346,7 @@ class HTTPBulkToolsResponse extends HTTPResponse $body['records']['failed'] = $this->failedRecords; } - if (count($body['records']['success']) === 0) { + if (isset($body['records']['success']) && count($body['records']['success']) === 0) { $body['isWarning'] = true; }