Skip to content

Commit

Permalink
check for array before loop
Browse files Browse the repository at this point in the history
  • Loading branch information
BrianHenryIE committed Apr 25, 2024
1 parent 2313d65 commit 7a0a927
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Change Log

## 0.18.1 April 2024

* Fix: check for array before loop

## 0.18.0 April 2024


Expand Down
3 changes: 3 additions & 0 deletions src/Cleanup.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,9 @@ public function cleanupInstalledJson(): void
$installedJsonArray = $installedJsonFile->read();

foreach ($installedJsonArray['packages'] as $key => $package) {
if (!isset($package['autoload'])) {
continue;
}
$packageDir = $this->workingDir . $this->vendorDirectory . ltrim($package['install-path'], '.');
$autoload_key = $package['autoload'];
foreach ($autoload_key as $type => $autoload) {
Expand Down

0 comments on commit 7a0a927

Please sign in to comment.