Writers did not close written file pointer

This commit is contained in:
Adrien Loison 2016-03-23 10:16:56 -07:00
parent 6c57125c0c
commit c31373fb1a
2 changed files with 5 additions and 4 deletions

View File

@ -319,6 +319,11 @@ abstract class AbstractWriter implements WriterInterface
public function close()
{
$this->closeWriter();
if (is_resource($this->filePointer)) {
$this->globalFunctionsHelper->fclose($this->filePointer);
}
$this->isWriterOpened = false;
}
}

View File

@ -96,10 +96,6 @@ class Writer extends AbstractWriter
*/
protected function closeWriter()
{
if ($this->filePointer) {
$this->globalFunctionsHelper->fclose($this->filePointer);
}
$this->lastWrittenRowIndex = 0;
}
}