Skip to content
This repository was archived by the owner on Jan 2, 2019. It is now read-only.

Commit 8af620f

Browse files
author
MarkBaker
committed
GH-879 Bug in file PHPExcel/Reader/CSV.php
Code logic identifying a defined separator when no separator is explicitly defined Case-insensitive check when separator is explicitly defined
1 parent c4782b6 commit 8af620f

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Classes/PHPExcel/Reader/CSV.php

+4-3
Original file line numberDiff line numberDiff line change
@@ -168,10 +168,11 @@ protected function checkSeparator()
168168
return;
169169
}
170170

171-
if ((strlen(trim($line)) == 5) && (strpos($line, 'sep=') !== 0)) {
172-
return $this->skipBOM();
171+
if ((strlen(trim($line, "\r\n")) == 5) && (stripos($line, 'sep=') === 0)) {
172+
$this->delimiter = substr($line, 4, 1);
173+
return;
173174
}
174-
$this->delimiter = substr($line, 4, 1);
175+
return $this->skipBOM();
175176
}
176177

177178
/**

0 commit comments

Comments
 (0)