View Issue Details

IDProjectCategoryView StatusLast Update
0036765mantisbtplug-inspublic2025-12-29 20:30
Reportercbff Assigned Todregad  
PrioritynormalSeveritytweakReproducibilityalways
Status closedResolutionfixed 
Target Version2.28.0Fixed in Version2.28.0 
Summary0036765: The plugin_get_current() function returns an incorrect value when executed from MantisPlugin::schema()
Description

During the development of a plugin, while creating a base class that is an extension of MantisPlugin, an attempt was made to implement the schema() function and at one point an attempt was made to use the plugin_get_current() function to obtain the plugin's base name. Instead of returning the base name, the function returned the plugin's name, as defined in the register() method ($this->name).

Upon further investigation, it was found that the plugin_needs_upgrade() function in its first line is executing plugin_push_current($p_plugin->name), when it should actually be plugin_push_current($p_plugin->basename);

Steps To Reproduce

Simply try using the plugin_get_current() function inside the schema() function and observe the result.

TagsNo tags attached.

Activities

There are no notes attached to this issue.

Related Changesets

MantisBT: master efd35e33

2025-12-13 11:35

dregad


Details Diff
Fix incorrect plugin_push_current() call

The plugin stack expects the plugin's basename, not its name.

Bug introduced in 97f7ad7a629044d1d04971c910a2bf8572b9233f.

Fixes 0036765
Affected Issues
0036765
mod - core/plugin_api.php Diff File