query_list(). initialize return value to array(), to allways return an array

This commit is contained in:
Ralf Becker 2011-09-09 09:41:51 +00:00
parent 65a90eabb8
commit 476deb3605

View File

@ -1435,7 +1435,7 @@ class so_sql
} }
if (!is_array($value_col)) $value_col = array($value_col); if (!is_array($value_col)) $value_col = array($value_col);
$cols = array(); $cols = $ret = array();
foreach($value_col as $key => $col) foreach($value_col as $key => $col)
{ {
$cols[$key] = preg_match('/AS ([a-z_0-9]+)$/i',$col,$matches) ? $matches[1] : $col; $cols[$key] = preg_match('/AS ([a-z_0-9]+)$/i',$col,$matches) ? $matches[1] : $col;