Skip to content

Commit

Permalink
Fix PHP notice when no ref exist on dependency (#290)
Browse files Browse the repository at this point in the history
  • Loading branch information
eiriksm committed Mar 31, 2023
1 parent fc4ef7a commit df64745
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/CosyComposer.php
Original file line number Diff line number Diff line change
Expand Up @@ -1815,6 +1815,12 @@ protected function createTitle($item, $post_update_data, $security_update = fals
public function getReleaseLinks($lockdata, $package_name, $pre_update_data, $post_update_data) : array
{
$extra_info = '';
if (empty($pre_update_data->source->reference) || empty($post_update_data->source->reference)) {
throw new \Exception('No SHAs to use to compare and retrieve tags for release links');
}
if (empty($post_update_data->source->url)) {
throw new \Exception('No source URL to attempt to parse in post update data source');
}
$data = $this->getFetcher()->retrieveTagsBetweenShas($lockdata, $package_name, $pre_update_data->source->reference, $post_update_data->source->reference);
$url = $post_update_data->source->url;
$url = preg_replace('/.git$/', '', $url);
Expand Down

0 comments on commit df64745

Please sign in to comment.