Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
jqhph committed Oct 30, 2019
1 parent ebdbf1e commit 1f56698
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
10 changes: 9 additions & 1 deletion src/Exporters/Exporter.php
Original file line number Diff line number Diff line change
Expand Up @@ -246,11 +246,19 @@ protected function makeWriter(?string $path = null, string $factory = null)
return $this->writer = $writer;
}

/**
* @return void
*/
protected function releaseResources()
{
$this->writer->close();
if ($this->writer) {
$this->writer->close();
}
}

/**
* @return void
*/
protected function removeHttpHeaders()
{
if (! headers_sent()) {
Expand Down
7 changes: 6 additions & 1 deletion src/Importers/Importer.php
Original file line number Diff line number Diff line change
Expand Up @@ -239,9 +239,14 @@ protected function makeNullSheet()
return new NullSheet();
}

/**
* @return void
*/
protected function releaseResources()
{
$this->reader->close();
if ($this->reader) {
$this->reader->close();
}

$this->removeTempFile();
}
Expand Down

0 comments on commit 1f56698

Please sign in to comment.