diff --git a/app/Lib/Export/Stix2Export.php b/app/Lib/Export/Stix2Export.php index f471e204a..d6d1dc39c 100644 --- a/app/Lib/Export/Stix2Export.php +++ b/app/Lib/Export/Stix2Export.php @@ -20,7 +20,7 @@ class Stix2Export extends StixExport $filename = $this->__scripts_dir . 'tmp/' . $filename; $my_server = ClassRegistry::init('Server'); $result = shell_exec($my_server->getPythonVersion() . ' ' . $scriptFile . ' ' . $filename . $this->__end_of_cmd); - $result = end(preg_split("/\r\n|\n|\r/", trim($result))); - return $result; + $result = preg_split("/\r\n|\n|\r/", trim($result)); + return end($result); } }