View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0037313 | mantisbt | installation | public | 2026-07-17 14:09 | 2026-07-18 12:32 |
| Reporter | dregad | Assigned To | dregad | ||
| Priority | normal | Severity | minor | Reproducibility | always |
| Status | resolved | Resolution | fixed | ||
| Target Version | 2.29.0 | Fixed in Version | 2.29.0 | ||
| Summary | 0037313: Invalid default $g_path when running from CLI | ||||
| Description | The set_default_path() function relies on $_SERVER['SCRIPT_NAME'], which does not contain an URL when running from CLI. This results in a (most likely) invalid URL being stored in $g_path, which could lead to unexpected behavior or errors later on. We should not initialize $g_path in this scenario, and rely on the admin defining it in config_inc.php. | ||||
| Additional Information | While running some tests on a Windows PC that had an incomplete wiki configuration, wiki_init() choked when feeding $g_path DEPRECATED: 'Automatic conversion of false to array is deprecated' in '/Users/dregad/dev/mantisbt/mantis/core/wiki_api.php' line 54 | ||||
| Tags | No tags attached. | ||||
|
MantisBT: master 30ed1ea3 2026-07-18 06:07 Details Diff |
Do not set default $g_path from CLI The set_default_path() function relies on $_SERVER['SCRIPT_NAME'], which does not contain an URL when running from CLI. This results in a most likely invalid URL being stored in $g_path, which could lead to unexpected behavior or errors later on. Simply refuse to set $g_path in this case, and print a warning on screen. Note that this should normally not happen, except in development environments. Fixes 0037313 |
Affected Issues 0037313 |
|
| mod - core.php | Diff File | ||
|
MantisBT: master 4eba3290 2026-07-18 12:24 Details Diff |
Remove Warning echoed in set_default_path() This caused the PHPUnit tests to fail. Fixing regression from 30ed1ea36df25114daae6e45726ff47c4d6f45e8. |
Affected Issues 0037313 |
|
| mod - core.php | Diff File | ||