diff --git a/src/EDI/Parser.php b/src/EDI/Parser.php index 9166f7a..3a40558 100644 --- a/src/EDI/Parser.php +++ b/src/EDI/Parser.php @@ -276,7 +276,10 @@ public function analyseUNH(array $line): void } $this->messageFormat = $lineElement[0]; - $this->messageDirectory = $lineElement[2]; + + if (isset($lineElement[2])) { + $this->messageDirectory = $lineElement[2]; + } } /**