Skip to content

Commit

Permalink
bug fix DROP_NEW_LINE can be removed with setFlags
Browse files Browse the repository at this point in the history
  • Loading branch information
nyamsprod committed Mar 23, 2015
1 parent 6bab6be commit eae1c42
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
#Changelog
All Notable changes to `League\Csv` will be documented in this file

## 7.0.1 - 2015-03-XX

### Fixed

- `setFlags`: `SplFileObject::DROP_NEW_LINE` can be remove using `setFlags` method.

## 7.0.0 - 2015-02-19

### Added
Expand Down
2 changes: 1 addition & 1 deletion src/Config/Controls.php
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ public function setFlags($flags)
throw new InvalidArgumentException('you should use a `SplFileObject` Constant');
}

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

return $this;
}
Expand Down
1 change: 0 additions & 1 deletion test/ControlsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,6 @@ public function testSetFlags()
$this->csv->setFlags(SplFileObject::SKIP_EMPTY);
$this->assertSame(SplFileObject::SKIP_EMPTY, $this->csv->getFlags() & SplFileObject::SKIP_EMPTY);
$this->assertSame(SplFileObject::READ_CSV, $this->csv->getFlags() & SplFileObject::READ_CSV);
$this->assertSame(SplFileObject::DROP_NEW_LINE, $this->csv->getFlags() & SplFileObject::DROP_NEW_LINE);

$this->csv->setFlags(-3);
}
Expand Down

0 comments on commit eae1c42

Please sign in to comment.