From 64a30723b7d165137b28707310fa388b85a16dce Mon Sep 17 00:00:00 2001 From: chrisr3d Date: Mon, 13 Dec 2021 16:59:14 +0100 Subject: [PATCH] fix: [stix export] Copy paste issue from merge conflict handling --- app/Lib/Export/StixExport.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Lib/Export/StixExport.php b/app/Lib/Export/StixExport.php index 7d91d63ab..b2a780925 100644 --- a/app/Lib/Export/StixExport.php +++ b/app/Lib/Export/StixExport.php @@ -269,7 +269,7 @@ abstract class StixExport } } $converter = new JSONConverterTool(); - $event = JsonTool::encode($converter->convert($data, false, true)); // we don't need pretty printed JSON + $event = JsonTool::encode($converter->convert($event, false, true)); // we don't need pretty printed JSON if ($this->__n_attributes + $attributes_count <= $this->__attributes_limit) { $this->__tmp_file->append($this->__n_attributes == 0 ? $event : ', ' . $event); $this->__n_attributes += $attributes_count; @@ -368,7 +368,7 @@ abstract class StixExport private function __write_stix_content($filename, $separator) { $stix_content = FileAccessTool::readAndDelete($filename); - if ($this->__return_type === 'stix') { + if ($this->__return_type === 'stix2') { $stix_content = substr($stix_content, 1, -1); } $this->stixFile->writeWithSeparator($stix_content, $separator);