Merge pull request #6110 from RichieB2B/ncsc-nl/unlink

fix: [StixExport] suppress unlink warnings
pull/6116/head
Andras Iklody 2020-07-12 16:49:05 +02:00 committed by GitHub
commit 784ee2b206
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 6 deletions

View File

@ -97,7 +97,7 @@ class StixExport
$stix_event = ($this->__return_type == 'stix') ? $file->read() : substr($file->read(), 1, -1);
$file->close();
$file->delete();
unlink($this->__tmp_dir . $filename);
@unlink($this->__tmp_dir . $filename);
$this->__stix_file->append($stix_event . $this->__framing['separator']);
unset($stix_event);
}
@ -131,11 +131,7 @@ class StixExport
{
foreach ($this->__filenames as $f => $filename) {
if ($index >= $f) {
try {
unlink($this->__tmp_dir . $filename);
} catch (Exception $e) {
unset($e);
}
@unlink($this->__tmp_dir . $filename);
}
}
$this->__stix_file->close();