View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0010879 | mantisbt | plug-ins | public | 2009-08-27 01:49 | 2009-10-07 14:19 |
Reporter | dhx | Assigned To | jreese | ||
Priority | normal | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Target Version | 1.2.0rc2 | Fixed in Version | 1.2.0rc2 | ||
Summary | 0010879: Cannot uninstall plugins: attempted use of undefined index within g_plugin_cache_protected | ||||
Description | This bug was introduced with http://git.mantisbt.org/?p=mantisbt.git;a=commitdiff;h=df475bdce50d5f5a2ab09c2b3514113de33a0310 Steps to reproduce:
Error received: Backtrace: | ||||
Tags | No tags attached. | ||||
manage_plugin_uninstall.php disables plugins, thus causing core.php to NOT call plugin_init_installed(). If plugin_init_installed() is not called, then plugin_register_installed() is also not called. The only place where $g_plugin_cache_priority and $g_plugin_cache_protected are updated is within plugin_register_installed(). Hence when plugin_protected() is called from within plugin_uninstall (where PLUGINS_DISABLED is defined as true) it'll attempt to access the non-existent $g_plugin_cache_protected cache. Maybe it is best to introduce a new function that generates the $g_plugincache* variables? Or if we don't mind the extra query, split it into plugin_cache_protected() and plugin_cache_priority(). These functions can then be called from within plugin_priorty() and plugin_protected() if the cache is null. Thus the requirement on calling plugin_register_installed() is removed completely. This sounds useful to me as there are times when you may want to know if a plugin is protected (or what the priority is) without actually registering it. |
|
Fix committed to 1.2.x and master branches. |
|
MantisBT: master-1.2.x 0430df5d 2009-09-04 12:00 Details Diff |
Fix 0010879: Pre-register plugins at uninstall time |
Affected Issues 0010879 |
|
mod - manage_plugin_uninstall.php | Diff File | ||
MantisBT: master 82873626 2009-09-04 12:00 Details Diff |
Fix 0010879: Pre-register plugins at uninstall time |
Affected Issues 0010879 |
|
mod - manage_plugin_uninstall.php | Diff File |