1
0
mirror of https://github.com/danog/MadelineProto.git synced 2024-11-30 10:59:02 +01:00

Small phar fix

This commit is contained in:
Daniil Gentili 2021-04-06 20:57:47 +02:00
parent 45f1a5311a
commit a2fcad6c6a
Signed by: danog
GPG Key ID: 8C1BE3B34B230CA7

View File

@ -97,8 +97,11 @@ function ___install_madeline()
return []; return [];
} }
$composer = \json_decode(\file_get_contents("phar://madeline.phar$ext/vendor/composer/installed.json"), true) ?: []; $composer = \json_decode(\file_get_contents("phar://madeline.phar$ext/vendor/composer/installed.json"), true) ?: [];
if (!isset($composer['packages'])) {
return [];
}
$packages = []; $packages = [];
foreach ($composer as $dep) { foreach ($composer['packages'] as $dep) {
$packages[$dep['name']] = $dep['version_normalized']; $packages[$dep['name']] = $dep['version_normalized'];
} }
return $packages; return $packages;