View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0036765 | mantisbt | plug-ins | public | 2025-12-11 10:59 | 2025-12-11 11:53 |
| Reporter | cbff | Assigned To | |||
| Priority | normal | Severity | tweak | Reproducibility | always |
| Status | new | Resolution | open | ||
| Summary | 0036765: 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. | ||||
| Tags | No tags attached. | ||||