BUG 7694 Adjustment to discard null lines in files csv.

This commit is contained in:
Hector Cortez
2011-09-26 16:30:39 -04:00
parent 787c38e6e1
commit 22cecea2d3

View File

@@ -527,7 +527,8 @@ class pmTablesProxy extends HttpProxyController
$i = 1;
$swHead = false;
while (($aAux = fgetcsv($oFile, 4096, $_POST['form']['CSV_DELIMITER'])) !== false) {
if(count($aAdditionalTables['FIELDS']) != count($aAux)){
if(!is_null($aAux[0])) {
if(count($aAdditionalTables['FIELDS']) > count($aAux)){
$this->success = false;
$this->message = G::LoadTranslation('INVALID_FILE');
return 0;
@@ -560,6 +561,7 @@ class pmTablesProxy extends HttpProxyController
}
$i++;
}
}
fclose($oFile);
}
if ($sErrorMessages != '') {