Skip to content

Commit

Permalink
Avoid PHP notice (#286)
Browse files Browse the repository at this point in the history
* Avoid PHP notice

* Update composer.json
  • Loading branch information
eiriksm committed Feb 13, 2023
1 parent f0e1309 commit 1e056b7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@
"config": {
"sort-packages": true,
"allow-plugins": {
"cweagans/composer-patches": true
"cweagans/composer-patches": true,
"php-http/discovery": true
}
},
"autoload-dev": {
Expand Down
3 changes: 3 additions & 0 deletions src/CosyComposer.php
Original file line number Diff line number Diff line change
Expand Up @@ -1807,6 +1807,9 @@ public function getReleaseLinks($lockdata, $package_name, $pre_update_data, $pos
$url = $post_update_data->source->url;
$url = preg_replace('/.git$/', '', $url);
$url_parsed = parse_url($url);
if (empty($url_parsed['host'])) {
throw new \Exception('No URL to parse in post update data source');
}
$link_pattern = null;
$links = [];
switch ($url_parsed['host']) {
Expand Down

0 comments on commit 1e056b7

Please sign in to comment.