MDL-49329 admin: Fix report on required core version in missing plugins
If the plugin was missing from disk, the required core version was
displayed as "Moodle {$a}" because the core dependency resolver always
returns an object.
This commit is contained in:
@@ -794,6 +794,11 @@ class core_plugin_manager {
|
||||
public function resolve_requirements(\core\plugininfo\base $plugin, $moodleversion=null, $moodlebranch=null) {
|
||||
global $CFG;
|
||||
|
||||
if ($plugin->versiondisk === null) {
|
||||
// Missing from disk, we have no version.php to read from.
|
||||
return array();
|
||||
}
|
||||
|
||||
if ($moodleversion === null) {
|
||||
$moodleversion = $CFG->version;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user