This should at least catch #357

This commit is contained in:
James Cole 2016-10-14 19:18:00 +02:00
parent 148956a60d
commit 3598780d54

View File

@ -111,9 +111,14 @@ class CsvImporter implements ImporterInterface
// set some vars:
$object->setUser($this->job->user);
$config = $this->job->configuration;
$json = json_encode($row);
if ($json === false) {
throw new FireflyException(sprintf('Could not process row #%d. Are you sure the uploaded file is encoded as "UTF-8"?', $index));
}
// hash the row:
$hash = hash('sha256', json_encode($row));
$hash = hash('sha256', $json);
$object->importValue('hash', 100, $hash);
// and this is the point where the specifix go to work.