Skip to content

Commit eae1c42

Browse files
committed
bug fix DROP_NEW_LINE can be removed with setFlags
1 parent 6bab6be commit eae1c42

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
#Changelog
22
All Notable changes to `League\Csv` will be documented in this file
33

4+
## 7.0.1 - 2015-03-XX
5+
6+
### Fixed
7+
8+
- `setFlags`: `SplFileObject::DROP_NEW_LINE` can be remove using `setFlags` method.
9+
410
## 7.0.0 - 2015-02-19
511

612
### Added

src/Config/Controls.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ public function setFlags($flags)
221221
throw new InvalidArgumentException('you should use a `SplFileObject` Constant');
222222
}
223223

224-
$this->flags = $flags|SplFileObject::READ_CSV|SplFileObject::DROP_NEW_LINE;
224+
$this->flags = $flags|SplFileObject::READ_CSV;
225225

226226
return $this;
227227
}

test/ControlsTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,6 @@ public function testSetFlags()
178178
$this->csv->setFlags(SplFileObject::SKIP_EMPTY);
179179
$this->assertSame(SplFileObject::SKIP_EMPTY, $this->csv->getFlags() & SplFileObject::SKIP_EMPTY);
180180
$this->assertSame(SplFileObject::READ_CSV, $this->csv->getFlags() & SplFileObject::READ_CSV);
181-
$this->assertSame(SplFileObject::DROP_NEW_LINE, $this->csv->getFlags() & SplFileObject::DROP_NEW_LINE);
182181

183182
$this->csv->setFlags(-3);
184183
}

0 commit comments

Comments
 (0)