From a2fcad6c6a677c1aad87b3e8162e1081ec60a699 Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Tue, 6 Apr 2021 20:57:47 +0200 Subject: [PATCH] Small phar fix --- tools/phar.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/phar.php b/tools/phar.php index 352c62c4f..ac7a57a0f 100644 --- a/tools/phar.php +++ b/tools/phar.php @@ -97,8 +97,11 @@ function ___install_madeline() return []; } $composer = \json_decode(\file_get_contents("phar://madeline.phar$ext/vendor/composer/installed.json"), true) ?: []; + if (!isset($composer['packages'])) { + return []; + } $packages = []; - foreach ($composer as $dep) { + foreach ($composer['packages'] as $dep) { $packages[$dep['name']] = $dep['version_normalized']; } return $packages;