$this->separator = ";";
rewind($handle);
$header = fgetcsv($handle, 0, $this->separator);
- if (count($header) == 1) {
- die("Invalid file format for " . $this->_file . ". It must be a valid csv with separator ',' or ';'\n");
- }
}
$this->header = $header;
continue;
}
$this->row++;
+ if ($this->row % 1000 == 0) {
+ // Reset PEAR_DB_DATAOBJECT cache to prevent memory leak
+ CRM_Core_DAO::freeResult();
+ }
$params = $this->convertLine($data);
$this->processLine($params);
}