1
0
mirror of https://github.com/owncloudarchive/contacts.git synced 2024-12-11 22:24:32 +01:00

fix php 4.3

This commit is contained in:
Bernhard Posselt 2014-07-23 18:16:01 +02:00 committed by Thomas Müller
parent 07217e0ec4
commit 73c35f43aa

View File

@ -68,7 +68,8 @@ class ImportCsvConnector extends ImportConnector {
$delimiter = (string)$this->configContent->import_core->delimiter; $delimiter = (string)$this->configContent->import_core->delimiter;
} else { } else {
// Look for the delimiter in the first line, should be the most present character between ',', ';' and '\t' // Look for the delimiter in the first line, should be the most present character between ',', ';' and '\t'
$firstLine = (new SplFileObject($file))->fgets(); $splFile = new SplFileObject($file);
$firstLine = $splFile->fgets();
$nbComma = substr_count($firstLine, ','); $nbComma = substr_count($firstLine, ',');
$nbSemicolon = substr_count($firstLine, ';'); $nbSemicolon = substr_count($firstLine, ';');
$nbTab = substr_count($firstLine, "\t"); $nbTab = substr_count($firstLine, "\t");