View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0016516 | mantisbt | filters | public | 2013-10-20 15:44 | 2014-12-08 02:07 |
Reporter | rombert | Assigned To | dregad | ||
Priority | normal | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | 1.3.0dev | ||||
Target Version | 1.3.0-beta.1 | ||||
Summary | 0016516: Filters: clicking on 'Use Date Filters' leads to 'Data Type mismatch' | ||||
Description | The full error message is 'Data Type mismatch. Enable detailed error messages for further information.' Full path: /mnt/md/robert/git/mantisbt/core/helper_api.php | ||||
Tags | No tags attached. | ||||
Not fixed, there is a comparison of boolean and string There is code where the setting is treated as a boolean |
|
Can you explain how you triggered the error? It would ease debugging (this filter api is a bitch...). |
|
1) click "View Issues" get
|
|
Caused by wrong adodb version. git clone git@github.com:mantisbt/mantisbt.git After that you have adodb version 5.10 in master branch. (also in nightly builds of master branch) Replacing 5.10 by 5.18 fixes the issue. |
|
The change did not explain that line 3888 of filter_api.php should be no longe a comparison of boolean and string
I tried on another platform and I still get the issue. |
|
Take 2. Hopefully that will work better ;-) My testing for earlier commit did not take all cases into consideration (i.e. with a reset filter) |
|
MantisBT: master 1a417b12 2013-10-22 11:55 Details Diff |
Fix data type mismatch when filtering by date This was caused by inconsistent initialization of filter, which was set to 'on' when checkbox was checked, and FALSE when unchecked. We now set it to 'off' when unchecked. Use of ternary operator to simplify code. Fixes 0016516 |
Affected Issues 0016516 |
|
mod - view_all_set.php | Diff File | ||
MantisBT: master 380b5de1 2013-10-27 15:24 Details Diff |
Fix data type mismatch when filtering by date Follow-up on commit 1a417b123b1dbea702c3b55ff4e83bc8b8fb5545 which did not cover all possible cases for the error. We now consistently store the 'filter by date' property as a boolean, and rely on gpc_string_to_bool() to ensure any string we get (e.g. 1, 'on', 'true') is properly converted to boolean before comparing. We therefore no longer need the ternary operator in view_all_set.php. We use 'on'/'off' when encoding the filter only. Fixes 0016516 |
Affected Issues 0016516 |
|
mod - core/filter_api.php | Diff File | ||
mod - view_all_set.php | Diff File |