From 72d2f6b0e5ae7e586ccab91f6dd5019ddaac6b17 Mon Sep 17 00:00:00 2001 From: lbergman Date: Tue, 1 Aug 2000 20:33:21 +0000 Subject: [PATCH] Fixed problem when importing fewer than 5 fields. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@668 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- src/addressbook_csvimport.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/addressbook_csvimport.php b/src/addressbook_csvimport.php index d98d698d..1dc1f1e2 100644 --- a/src/addressbook_csvimport.php +++ b/src/addressbook_csvimport.php @@ -158,8 +158,13 @@ // This loop sets up a table of the data they uploaded to save time while the user rearranges it. $row = 0; do { - ($data = fgetcsv($fp, 4096)); - $cols = count($data); + ($data = fgetcsv($fp, 4096)); + if(count($data) >= 5) { + $cols = count($data); + } else { + $cols = 5; + } +// $cols = count($data); $row++; if($flag == 0 && !$finish) { // Table header on initial import -- 2.25.1