View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0037379 | mantisbt | plug-ins | public | 2026-09-09 15:51 | 2026-09-09 19:08 |
| Reporter | SL-Gundam | Assigned To | community | ||
| Priority | low | Severity | tweak | Reproducibility | always |
| Status | resolved | Resolution | fixed | ||
| Product Version | 2.28.4 | ||||
| Target Version | 2.29.0 | Fixed in Version | 2.29.0 | ||
| Summary | 0037379: Return value plugin_lang_get_defaulted when no default supplied is incorrect | ||||
| Description | When you call: plugin_lang_get_defaulted( 'test' ); I would expect when plugin_pluginname_test does not exist that i get 'test' back. | ||||
| Tags | No tags attached. | ||||
|
Currently the workaround is to supply a value for the second parameter: plugin_lang_get_defaulted( 'test', 'test' ) |
|
You are correct, this is indeed what should happen - the behavior should match that of lang_get_defaulted(). That's an oversight on my part when I implemented this function (0026747), I did not have a use case for calling the function without a default and so never tested it properly. |
|
|
MantisBT: master 5a77ea96 2026-09-09 19:08 Committer: community Details Diff |
Fix plugin_lang_get_defaulted() return value When no default value is supplied, function was returning the fully qualified plugin string name (i.e. `plugin_<basename>_<name>`) instead of the expected short language string name ($p_name). Fixes 0037379, PR https://github.com/mantisbt/mantisbt/pull/2278 |
Affected Issues 0037379 |
|
| mod - core/plugin_api.php | Diff File | ||