Fixed problem when importing fewer than 5 fields.
authorlbergman <lbergman@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Tue, 1 Aug 2000 20:33:21 +0000 (20:33 +0000)
committerlbergman <lbergman@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Tue, 1 Aug 2000 20:33:21 +0000 (20:33 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@668 7612ce4b-ef26-0410-bec9-ea0150e637f0

src/addressbook_csvimport.php

index d98d698da09a22240cf0a04dc81a53fb799caef7..1dc1f1e29b52d5060bd6300c8628c19f4d3a41de 100644 (file)
    // 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