Skip to content

Commit

Permalink
Fix undefined array key "assets"
Browse files Browse the repository at this point in the history
  • Loading branch information
sy-records committed Mar 26, 2024
1 parent 14a0eca commit e6a0e91
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Commands/Concerns/InstallsFrankenPhpDependencies.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ protected function downloadFrankenPhpBinary()

$assets = Http::accept('application/vnd.github+json')
->withHeaders(['X-GitHub-Api-Version' => '2022-11-28'])
->get('https://api.github.com/repos/dunglas/frankenphp/releases/latest')['assets'];
->get('https://api.github.com/repos/dunglas/frankenphp/releases/latest')['assets'] ?? [];

foreach ($assets as $asset) {
if ($asset['name'] !== $assetName) {
Expand Down

0 comments on commit e6a0e91

Please sign in to comment.