MDL-80516 core: more robust plugin update component checking.

Occurs when a plugin in incorrectly removed (via file system only,
rather than following proper uninstall process), and also contains
it's own sub-plugins.

In the above scenario, the update would request and receive back a
response for a plugin whose name was comprised of an empty string,
subsequently causing errors when processing said response.
This commit is contained in:
Paul Holden
2024-01-15 14:10:05 +00:00
parent 580c009cac
commit 26bc1fa27f
2 changed files with 5 additions and 2 deletions
+1 -1
View File
@@ -1550,7 +1550,7 @@ class core_plugin_manager {
$provider = \core\update\checker::instance();
if (!$provider->enabled() or during_initial_install()) {
if (!$provider->enabled() || $component === '' || during_initial_install()) {
return null;
}