From 11b20a31443523ee2dd3beec22f92d2b1d4c24dc Mon Sep 17 00:00:00 2001 From: Susann Sgorzaly Date: Tue, 27 Feb 2018 15:10:55 +0100 Subject: [PATCH] fixes #42. If csv has heading and offset is set, first row will always be parsed --- src/Csv.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Csv.php b/src/Csv.php index 74381e4..a4062f6 100644 --- a/src/Csv.php +++ b/src/Csv.php @@ -987,7 +987,8 @@ class Csv { return $this->sort_by !== null || $this->offset === null || - $current_row >= $this->offset; + $current_row >= $this->offset || + ($this->heading && $current_row == 0); } /**