From bd616f8a34cb46d79b108b7ed5a443f647ca29bb Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Sun, 6 Nov 2011 09:49:53 +0000 Subject: [PATCH] merged some fixes from Trunk to quieten warnings in CalDAV: - r36515: query_list(). initialize return value to array(), to allways return an array - r36542: skip the empty (NULL) row --- etemplate/inc/class.so_sql.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/etemplate/inc/class.so_sql.inc.php b/etemplate/inc/class.so_sql.inc.php index 29e610ad60..febaf37ee6 100644 --- a/etemplate/inc/class.so_sql.inc.php +++ b/etemplate/inc/class.so_sql.inc.php @@ -1435,7 +1435,7 @@ class so_sql } if (!is_array($value_col)) $value_col = array($value_col); - $cols = array(); + $cols = $ret = array(); foreach($value_col as $key => $col) { $cols[$key] = preg_match('/AS ([a-z_0-9]+)$/i',$col,$matches) ? $matches[1] : $col; @@ -1466,7 +1466,7 @@ class so_sql { $data = $row[current($cols)]; } - $ret[$row[$key_col]] = $data; + if ($data) $ret[$row[$key_col]] = $data; } } return $cache[$cache_key] =& $ret;