Skip to content

Commit

Permalink
Revert "helper_array_transpose() only handles bidimentional arrays"
Browse files Browse the repository at this point in the history
This reverts commit eaa7286.
  • Loading branch information
vboctor committed Sep 3, 2016
1 parent 1b32685 commit dd39f53
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions core/helper_api.php
Expand Up @@ -89,9 +89,8 @@ function helper_alternate_class( $p_index = null, $p_odd_class = 'row-1', $p_eve
* @return array|mixed transposed array or $p_array if not 2-dimensional array
*/
function helper_array_transpose( array $p_array ) {
if( !isset( $p_array[0] ) || !is_array( $p_array[0] ) ) {
// This function can only handle bidimentional arrays
trigger_error( ERROR_GENERIC, ERROR );
if( !is_array( $p_array ) ) {
return $p_array;
}
$t_out = array();
foreach( $p_array as $t_key => $t_sub ) {
Expand Down

0 comments on commit dd39f53

Please sign in to comment.