Permalink
Browse files

MDL-28723 Make sure that the arrays used by print_plugin_tables() are…

… correctly initialized

This covers a very rare and unexpected case when no mods or no blocks
are installed. Credit goes to Aparup Banerjee for spotting this.
  • Loading branch information...
1 parent 9d228de commit a0e1c31535aa9e6153f9537ad5b46795c0196c45 @mudrd8mz mudrd8mz committed Aug 16, 2011
Showing with 3 additions and 0 deletions.
  1. +3 −0 lib/adminlib.php
View
@@ -6200,13 +6200,16 @@ function print_plugin_tables() {
$installed_mods = $DB->get_records('modules', null, 'name');
$installed_blocks = $DB->get_records('block', null, 'name');
+ $plugins_installed['mod'] = array();
foreach($installed_mods as $mod) {
$plugins_installed['mod'][] = $mod->name;
}
+ $plugins_installed['blocks'] = array();
foreach($installed_blocks as $block) {
$plugins_installed['blocks'][] = $block->name;
}
+
$plugins_installed['filter'] = array();
$plugins_ondisk = array();

0 comments on commit a0e1c31

Please sign in to comment.