diff --git a/src/Utils.php b/src/Utils.php index 5143731c7..055aa944b 100644 --- a/src/Utils.php +++ b/src/Utils.php @@ -109,6 +109,10 @@ public static function composerGetExtras($key = 'kint') if (\file_exists($installed) && \is_readable($installed)) { $packages = \json_decode(\file_get_contents($installed), true); + if (!is_array($packages)) { + continue; + } + foreach ($packages as $package) { if (isset($package['extra'][$key]) && \is_array($package['extra'][$key])) { $extras = \array_replace($extras, $package['extra'][$key]);