Skip to content

Commit

Permalink
Fix array access in gitlab repo
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian Fritsch authored and theseer committed Jul 8, 2022
1 parent 3802ba5 commit dac3e6f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/shared/repository/GitlabRepository.php
Expand Up @@ -30,7 +30,7 @@ public function getReleasesByRequestedPhar(RequestedPhar $requestedPhar): Releas

foreach ($this->jsonData->getParsed() as $entry) {
try {
$version = new Version($entry->tag_name);
$version = new Version($entry['tag_name']);
} catch (InvalidVersionException $exception) {
// we silently ignore invalid version identifiers for now as they are
// likely to be an arbitrary tag that erroneously got promoted to release
Expand All @@ -39,9 +39,9 @@ public function getReleasesByRequestedPhar(RequestedPhar $requestedPhar): Releas
$pharUrl = null;
$signatureUrl = null;

foreach ($entry->assets->links as $asset) {
$assetName = $asset->name;
$url = $asset->url;
foreach ($entry['assets']['links'] as $asset) {
$assetName = $asset['name'];
$url = $asset['url'];

if (substr($assetName, -5, 5) === '.phar') {
$pharUrl = new PharUrl($url);
Expand Down

0 comments on commit dac3e6f

Please sign in to comment.