View Issue Details

IDProjectCategoryView StatusLast Update
0017533mantisbtcustomizationpublic2014-12-08 00:33
Reportervboctor Assigned 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

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

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-24 22:16

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
Affected Issues
0017533
mod - adm_config_set.php Diff File