From ab8cc893f768e1dcd6b155733ff259c0235bd854 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Mon, 24 Mar 2014 17:00:54 +0000 Subject: [PATCH] Handle selected columns as array without erroring --- infolog/inc/class.infolog_so.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/infolog/inc/class.infolog_so.inc.php b/infolog/inc/class.infolog_so.inc.php index c520f84a52..eed4256634 100644 --- a/infolog/inc/class.infolog_so.inc.php +++ b/infolog/inc/class.infolog_so.inc.php @@ -906,11 +906,11 @@ class infolog_so $index_load_cfs && $query['col_filter']['info_type'] && in_array($query['col_filter']['info_type'],$index_load_cfs))) { $where = array('info_id' => array_keys($ids)); - if (!($query['csv_export'] || strchr($query['selectcols'],'#') === false || + if (!($query['csv_export'] || strchr(implode(',',$query['selectcols']),'#') === false || $index_load_cfs && $query['col_filter']['info_type'] && in_array($query['col_filter']['info_type'],$index_load_cfs))) { $where['info_extra_name'] = array(); - foreach(explode(',',$query['selectcols']) as $col) + foreach(is_array($query['selectcols']) ? $query['selectcols'] : explode(',',$query['selectcols']) as $col) { if ($col[0] == '#') $where['info_extra_name'][] = substr($col,1); }