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|
|Target Version||2.2.1||Fixed in Version||2.2.1|
|Summary||0022442: System error when opening Print reports|
When viewing issues then click the print reports buttons there is an error
Source site : https://www.mantisbt.org/bugs/print_all_bug_page.php
|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.
|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 12:49:59Details 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
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.
|mod - print_all_bug_page.php||Diff File|