Skip to content
This repository was archived by the owner on Jan 31, 2020. It is now read-only.

Commit 2ae657d

Browse files
committed
Merge branch 'hotfix/43'
Close #43
2 parents 23998e7 + 0458b42 commit 2ae657d

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/ZendDiagnostics/Check/SecurityAdvisory.php

+5-2
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,12 @@ public function check()
7575
}
7676

7777
$advisories = $this->securityChecker->check($this->lockFilePath, 'json');
78-
$advisories = @json_decode($advisories);
7978

80-
if (null === $advisories) {
79+
if (is_string($advisories)) {
80+
$advisories = @json_decode($advisories);
81+
}
82+
83+
if (!is_array($advisories)) {
8184
return new Warning('Could not parse response from security advisory service.');
8285
}
8386

0 commit comments

Comments
 (0)