Writers did not close written file pointer

This commit is contained in:
Adrien Loison committed 2016-03-23 10:21:27 -07:00
1 parent 6c57125c0c
commit c31373fb1a
2 files changed
+5 -4

No files matched your search

+5
View File
@@ -319,6 +319,11 @@ abstract class AbstractWriter implements WriterInterface
public function close() public function close()
{ {
$this->closeWriter(); $this->closeWriter();
if (is_resource($this->filePointer)) {
$this->globalFunctionsHelper->fclose($this->filePointer);
}
$this->isWriterOpened = false; $this->isWriterOpened = false;
} }
} }
-4
View File
@@ -96,10 +96,6 @@ class Writer extends AbstractWriter
*/ */
protected function closeWriter() protected function closeWriter()
{ {
if ($this->filePointer) {
$this->globalFunctionsHelper->fclose($this->filePointer);
}
$this->lastWrittenRowIndex = 0; $this->lastWrittenRowIndex = 0;
} }
} }