We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bf8496e commit ca4d275Copy full SHA for ca4d275
src/Utils/Package.php
@@ -34,9 +34,13 @@ public static function version()
34
*/
35
public static function ltsInfo()
36
{
37
- $package = json_decode(
38
- file_get_contents("https://repo.packagist.org/p2/leafs/cli.json")
39
- );
+ $data = file_get_contents("https://repo.packagist.org/p2/leafs/cli.json");
+
+ if (!$data) {
40
+ return static::info();
41
+ }
42
43
+ $package = json_decode($data);
44
45
return $package->packages->{"leafs/cli"}[0];
46
}
0 commit comments