View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0022442 | mantisbt | printing | public | 2017-03-01 11:18 | 2017-03-12 19:23 |
Reporter | rct | Assigned To | dregad | ||
Priority | normal | Severity | minor | Reproducibility | sometimes |
Status | closed | Resolution | fixed | ||
Product Version | 2.2.0 | ||||
Target Version | 2.2.1 | Fixed in Version | 2.2.1 | ||
Summary | 0022442: System error when opening Print reports | ||||
Description | When viewing issues then click the print reports buttons there is an error SYSTEM ERROR Source site : https://www.mantisbt.org/bugs/print_all_bug_page.php Thanks | ||||
Steps To Reproduce | This bug happens when you haven't navigated too much into Mantis (???!!!). If you don't see this error clear all your browser cache then retry you should see the error then navigate through the site (change project, view issues, changelog, ...) and check again you won't probably see the error. Cookies ? EDIT (dregad):
| ||||
Tags | No tags attached. | ||||
I can reproduce the problem; updated the steps to reproduce. The problem is indeed as you suspected caused by the absence of the VIEW_ALL_COOKIE; the code does not cover this case, so the filter is not properly initialized (SYSTEM NOTICE: 'Undefined variable: t_filter_cookie_arr' in '/home/ubuntu/workspace/mantisbt/print_all_bug_page.php' line 201) |
|
Reducing severity to minor since there's a simple workaround |
|
@dregad let me know if i have to look at this for a fix |
|
Targetting 2.2.1 per discussion with @vboctor on Gitter. @cproensa Thanks but I don't think your help is needed. IMO the issue is not with the new API function, even though its introduction revealed the problem. Feel free to review the PR though. |
|
Ok nice thank you. |
|
MantisBT: master-2.2 5bd51cc9 2017-03-01 07:49 Details Diff |
Fix print page error when cookie not set When the VIEW_ALL_COOKIE is not set or blank, an attempt to display print_all_bug_page.php will trigger a system error: 'Argument 1 passed to filter_get_visible_sort_properties_array() must be an array, null given'. This is due to the filter ($t_filter_cookie_arr) not being initialized in this case, leading to an error as it's defaulted to NULL while the filter_get_visible_sort_properties_array() function expects an array. Use a default filter when the cookie is not set or empty. Fixes 0022442 |
Affected Issues 0022442 |
|
mod - print_all_bug_page.php | Diff File |