Skip to content

Commit

Permalink
Fix bucket level, it might be undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
ursuleacv authored Jun 11, 2021
1 parent dd415c0 commit e3def50
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Provider/MerchantOS.php
Original file line number Diff line number Diff line change
Expand Up @@ -1120,8 +1120,9 @@ public function makeAPICall($controlUrl, $action, $uniqueId, $params, $data)
$this->requestHeaders = $response->getHeaders();

if ($this->debugMode) {
$bucketLevel = $this->requestHeaders['X-LS-API-Bucket-Level'][0] ?? '';
$logMessage = ' Account=' . $this->accountId;
$logMessage .= ' X-LS-API-Bucket=' . $this->requestHeaders['X-LS-API-Bucket-Level'][0];
$logMessage .= ' X-LS-API-Bucket=' . $bucketLevel;
$logMessage .= ' Req=' . $this->context['action'] . ' ' . $this->context['apiCall'];
$this->logMessage = $logMessage;
}
Expand Down

0 comments on commit e3def50

Please sign in to comment.