Author: mcantelon
Date: Tue Jan 10 15:22:09 2012
New Revision: 10636
Log:
Added sanity checking for skip-rows CLI option.
Modified:
trunk/lib/task/csvImportTask.class.php
Modified: trunk/lib/task/csvImportTask.class.php
==============================================================================
--- trunk/lib/task/csvImportTask.class.php Tue Jan 10 15:18:35 2012
(r10635)
+++ trunk/lib/task/csvImportTask.class.php Tue Jan 10 15:22:09 2012
(r10636)
@@ -79,6 +79,11 @@
throw new sfException('rows-until-update must be an integer');
}
+ if ($options['skip-rows'] && !is_numeric($options['skip-rows']))
+ {
+ throw new sfException('skip-rows must be an integer');
+ }
+
$skipRows = ($options['skip-rows']) ? $options['skip-rows'] : 0;
if (false === $fh = fopen($arguments['filename'], 'rb'))
--
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.