Skip to content

Commit

Permalink
Merge pull request #318 from PrestaShopCorp/support-fix-logger-no-res…
Browse files Browse the repository at this point in the history
…ponse

Support fix logger no response
  • Loading branch information
emmanuelgautier authored Apr 3, 2023
2 parents eca83cb + 36a162e commit 1f69c71
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions ps_accounts.php
Original file line number Diff line number Diff line change
Expand Up @@ -565,8 +565,11 @@ public function hookActionObjectShopDeleteBefore($params)

try {
$response = $accountsApi->deleteUserShop($params['object']->id);

if (!$response || true !== $response['status']) {
if (!$response) {
$this->getLogger()->debug(
'Error trying to DELETE shop : No $response object'
);
} elseif (true !== $response['status']) {
$this->getLogger()->debug(
'Error trying to DELETE shop : ' . $response['httpCode'] .
' ' . print_r($response['body']['message'], true)
Expand Down

0 comments on commit 1f69c71

Please sign in to comment.