View Issue Details

IDProjectCategoryView StatusLast Update
0017533mantisbtcustomizationpublic2014-12-08 00:33
ReportervboctorAssigned Tovboctor 
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Product Version1.2.17 
Target Version1.3.0-beta.1Fixed in Version1.3.0-beta.1 
Summary0017533: Adding assoc arrays via config page converts numbers to strings
Description

If you enter the value below without $g_ and replacing ON with 1 and NOBODY with 55 and 100. You will notice that the array will show up in the configuration with quotes around the numbers like '1', '55', and '100' where it should be numbers.

$g_default_notify_flags = array('reporter'  => ON,
                                'handler'   => ON,
                                'monitor'   => ON,
                                'bugnotes'  => ON,
                                'explicit'  => ON,
                                'threshold_min' => NOBODY,
                                'threshold_max' => NOBODY);
Tagsmantishub

Activities

vboctor

vboctor

2014-10-25 01:54

manager   ~0041654

Last edited: 2014-10-25 02:06

View 2 revisions

Here is the test data to simplify testing:

Name: default_notify_flags
Value:
array('reporter' => 1, 'handler' => 1, 'monitor' => 1, 'bugnotes' => 1, 'explicit' => 1, 'threshold_min' => 55, 'threshold_max' => 100 );

vboctor

vboctor

2014-10-25 02:18

manager   ~0041655

Last edited: 2014-10-25 02:18

View 2 revisions

Here is the pull request:
https://github.com/mantisbt/mantisbt/pull/521

The pull request was tested with the case where constants or numbers are supplied.

Related Changesets

MantisBT: master 49a89ed5

2014-10-25 02:16:43

vboctor

Details Diff
Fix assoc array handling in config page

This issue likely affected integer handling in general. The fix tackles the following:

- Detect and handle properly numeric strings.
- Don't do constant replacements when the constants are enclosed in quotation marks.
- Variable name fix.

Fixes 0017533
mod - adm_config_set.php Diff File

Issue History

Date Modified Username Field Change
2014-07-21 18:01 vboctor New Issue
2014-07-21 18:01 vboctor Tag Attached: mantishub
2014-10-25 01:54 vboctor Note Added: 0041654
2014-10-25 02:06 vboctor Note Edited: 0041654 View Revisions
2014-10-25 02:18 vboctor Note Added: 0041655
2014-10-25 02:18 vboctor Assigned To => vboctor
2014-10-25 02:18 vboctor Status new => assigned
2014-10-25 02:18 vboctor Note Edited: 0041655 View Revisions
2014-10-31 19:15 vboctor Changeset attached => MantisBT master 49a89ed5
2014-10-31 19:15 vboctor Status assigned => resolved
2014-10-31 19:15 vboctor Resolution open => fixed
2014-10-31 19:15 vboctor Fixed in Version => 1.3.0-beta.1
2014-10-31 19:18 vboctor Target Version => 1.3.0-beta.1
2014-12-08 00:33 vboctor Status resolved => closed