Prevent error when close() called while writer already closed (#402)
This commit is contained in:
1 parent
742780613a
commit
4a65466b61
4 files changed
+56
-2
No files matched your search
@@ -350,6 +350,10 @@ abstract class AbstractWriter implements WriterInterface
|
||||
*/
|
||||
public function close()
|
||||
{
|
||||
if (!$this->isWriterOpened) {
|
||||
return;
|
||||
}
|
||||
|
||||
$this->closeWriter();
|
||||
|
||||
if (is_resource($this->filePointer)) {
|
||||
@@ -378,4 +382,3 @@ abstract class AbstractWriter implements WriterInterface
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user