diff --git a/src/Lib.php b/src/Lib.php index 8ba0dcc..08d4d5e 100644 --- a/src/Lib.php +++ b/src/Lib.php @@ -190,6 +190,12 @@ public static function php_throwable_args($arg = null, ...$args) : array $result[ 'messageDataList' ] = $messageDataList; $messageDataList = $messageDataList ?? []; + + $message = $messageList ? end($messageList) : null; + $code = $codeList ? end($codeList) : null; + $previous = $previousList ? end($previousList) : null; + $messageCode = $messageCodeList ? end($messageCodeList) : null; + $messageData = $messageDataList ? array_replace(...$messageDataList) : [];