Author: mcantelon
Date: Fri Apr 13 10:13:59 2012
New Revision: 11439

Log:
Added throwing of error when trying to import empty file.

Modified:
   trunk/lib/QubitFlatfileImport.class.php

Modified: trunk/lib/QubitFlatfileImport.class.php
==============================================================================
--- trunk/lib/QubitFlatfileImport.class.php     Fri Apr 13 00:03:23 2012        
(r11438)
+++ trunk/lib/QubitFlatfileImport.class.php     Fri Apr 13 10:13:59 2012        
(r11439)
@@ -426,6 +426,12 @@
   {
     $this->status['skippedRows'] = $skipRows;
     $this->columnNames = fgetcsv($fh, 60000);
+
+    if ($this->columnNames === FALSE)
+    {
+      throw new sfException('Could not read initial row. File could be 
empty.');
+    }
+
     $this->handleColumnRenaming();
 
     // add virtual columns (for column amalgamation, etc.)

-- 
You received this message because you are subscribed to the Google Groups 
"Qubit Toolkit Commits" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/qubit-commits?hl=en.

Reply via email to