Skip to content
This repository has been archived by the owner on Dec 14, 2024. It is now read-only.

Commit

Permalink
try fix wrong handling of case "no update avail for plugin"
Browse files Browse the repository at this point in the history
  • Loading branch information
Glutamat42 committed Nov 8, 2023
1 parent 1dcd978 commit 32a9e91
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions opt/adler/moodle/adler_setup/setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,15 @@ function get_plugin_config() {
$plugin['version'],
core_plugin_manager::instance()->get_plugin_info($plugin['name'])->release
);
if ($info) {

if ($info === false) {
cli_writeln("No update available for {$plugin['name']} {$plugin['version']}");
continue;
} else if ($info !== null && property_exists('tag_name', $info)) {
// checking for one of the keys is sufficient
$url = $info->zip_url;
} else {
cli_error("Failed to get release info");
cli_error("Failed to get release info for {$plugin['name']} {$plugin['version']}");
}
} else {
// plugin is a branch
Expand Down

0 comments on commit 32a9e91

Please sign in to comment.