mirror of
https://github.com/danog/MadelineProto.git
synced 2024-11-27 05:34:42 +01:00
Small phar fix
This commit is contained in:
parent
45f1a5311a
commit
a2fcad6c6a
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user