MantisBT: master-1.2.x 1ac581e4

Author Committer Branch Timestamp Parent
vboctor vboctor master-1.2.x 2013-09-25 15:56 master-1.2.x a1a150cd
Affected Issues  0016408: config_eval() fails on configs that reference array values
Changeset

Fixes 0016408: config_eval() fails on configs that reference array values

The $g_update_bug_assign_threshold is set to '%handle_bug_threshold%'.
If the value of $g_handle_bug_threshold is set to an array instead of a string/int, a system notice is generated that array to string conversion is done in config_eval().

The fix is to detect the direct assignment case and not use a string replace,
but use normal assignment. This will make it work for complex types like
arrays.

We still don't support $g_x = '%y%_aaa' where $g_y is not a string or int,
but that shouldn't be an issue.

mod - core/config_api.php Diff File