diff options
author | ignace nyamagana butera <nyamsprod@gmail.com> | 2015-12-10 12:32:13 +0100 |
---|---|---|
committer | ignace nyamagana butera <nyamsprod@gmail.com> | 2015-12-10 12:32:13 +0100 |
commit | 8558a84f1ef29ff9b1a585c8fa768132d9164405 (patch) | |
tree | 1e31c6cda56803d18c9014fede2b2f76fabbde18 /src | |
parent | b4d751c570870a7896e64b4f00af90c48b68a387 (diff) | |
download | csv-8558a84f1ef29ff9b1a585c8fa768132d9164405.zip csv-8558a84f1ef29ff9b1a585c8fa768132d9164405.tar.gz csv-8558a84f1ef29ff9b1a585c8fa768132d9164405.tar.bz2 |
Improve BOM API
Diffstat (limited to 'src')
-rw-r--r-- | src/Config/Output.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/Config/Output.php b/src/Config/Output.php index 4117717..baf5aa2 100644 --- a/src/Config/Output.php +++ b/src/Config/Output.php @@ -39,13 +39,13 @@ trait Output * The Input file BOM character * @var string */ - protected $input_bom; + protected $input_bom = ''; /** * The Output file BOM character * @var string */ - protected $output_bom; + protected $output_bom = ''; /** * Sets the CSV encoding charset @@ -83,10 +83,10 @@ trait Output * * @return static */ - public function setOutputBOM($str = null) + public function setOutputBOM($str) { if (empty($str)) { - $this->output_bom = null; + $this->output_bom = ''; return $this; } @@ -126,7 +126,7 @@ trait Output return strpos($line, $sequence) === 0; }); - $this->input_bom = array_shift($res); + $this->input_bom = (string) array_shift($res); } return $this->input_bom; |