Skip to content

Commit 63af74e

Browse files
committed
add try-catch
1 parent fa74d3b commit 63af74e

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

src/Integration/ModulesIntegration.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,13 @@ private static function getComposerPackages(): array
4545
{
4646
if (empty(self::$packages)) {
4747
foreach (InstalledVersions::getInstalledPackages() as $package) {
48-
$version = InstalledVersions::getPrettyVersion($package);
49-
if ($version !== null) {
50-
self::$packages[$package] = $version;
48+
try {
49+
$version = InstalledVersions::getPrettyVersion($package);
50+
if ($version !== null) {
51+
self::$packages[$package] = $version;
52+
}
53+
} catch (\Throwable $t) {
54+
// Ignore it in case of any error
5155
}
5256
}
5357
}

0 commit comments

Comments
 (0)