Skip to content

Commit

Permalink
SDK-2866: Fix error output (#36)
Browse files Browse the repository at this point in the history
  • Loading branch information
sergeyspryker authored Jul 26, 2023
1 parent 3a4b3c8 commit 733b2e2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Checker/SecurityChecker/SecurityChecker.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,11 @@ public function check(CheckerInputDataDto $inputData): CheckerResponseDto
$securityOutput,
);

$violations = json_decode($securityOutput->fetch(), true);
$rawViolations = $securityOutput->fetch();

$violations = json_decode($rawViolations, true);

if (!is_array($violations)) {
$rawViolations = $securityOutput->fetch();
$violationDto = new ViolationDto(
"Internal error. Original error: $rawViolations",
static::NAME,
Expand Down

0 comments on commit 733b2e2

Please sign in to comment.