From 73c35f43aa99f136404e77c79bbc88a2b7d6a509 Mon Sep 17 00:00:00 2001 From: Bernhard Posselt Date: Wed, 23 Jul 2014 18:16:01 +0200 Subject: [PATCH] fix php 4.3 --- lib/connector/importcsvconnector.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/connector/importcsvconnector.php b/lib/connector/importcsvconnector.php index eb86e9d0..d5f74deb 100755 --- a/lib/connector/importcsvconnector.php +++ b/lib/connector/importcsvconnector.php @@ -68,7 +68,8 @@ class ImportCsvConnector extends ImportConnector { $delimiter = (string)$this->configContent->import_core->delimiter; } else { // 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, ','); $nbSemicolon = substr_count($firstLine, ';'); $nbTab = substr_count($firstLine, "\t");