MantisBT: master-1.3.x fb35359b

Author Committer Branch Timestamp Parent
dregad dregad master-1.3.x 2016-09-01 06:16 master-1.3.x df005537
Affected Issues  0017325: helper_array_transpose should always return an array
Changeset

helper_array_transpose() only handles bidimensional arrays

The function now triggers an error if the input array is not
bidimensional.

This fixes the issues introduced by earlier attempt (see commit
eaa7286a87ec5bce9320807c18df542427989f68, reverted in dd39f53bb009f1172a312c6ccbb8d4dbd6984e21).

The original did not properly handle associative arrays, and had faulty
logic causing the function to always fail for arrays. It also did not
detect some "non-square" arrays (i.e. with the 1st element as array and
the 2nd as scalar).

Fixes 0017325

mod - core/helper_api.php Diff File