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
This commit is contained in:
Thomas Portelange 2020-09-02 14:01:46 +02:00 committed by GitHub
parent 7de4f77574
commit b00987b735
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;
}