Skip to content

Commit

Permalink
Avoid PHP warnings if items can not be iterated over (#310)
Browse files Browse the repository at this point in the history
  • Loading branch information
eiriksm committed Nov 13, 2023
1 parent a248462 commit fede875
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/NativeComposerChecker.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ public function checkDirectory($dir)
if (is_string($items)) {
continue;
}
if (empty($items)) {
continue;
}
if (empty($bc_result[$package])) {
$bc_result[$package] = [];
}
Expand Down

0 comments on commit fede875

Please sign in to comment.