View Issue Details

IDProjectCategoryView StatusLast Update
0036765mantisbtplug-inspublic2025-12-11 11:53
Reportercbff Assigned To 
PrioritynormalSeveritytweakReproducibilityalways
Status newResolutionopen 
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.