From 1fbbf94575ef02dc757f62b1f94f73ffd19c83f9 Mon Sep 17 00:00:00 2001 From: "ityaozm@gmail.com" Date: Sun, 10 Nov 2024 16:19:58 +0800 Subject: [PATCH] fix(CommitCommand): Replace null with empty string in message - Replace the null value with an empty string in the message - This change ensures that the message structure remains consistent and avoids issues with null values - Improves overall handling of commit messages in the application --- app/Commands/CommitCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Commands/CommitCommand.php b/app/Commands/CommitCommand.php index 57266ad..fde9672 100644 --- a/app/Commands/CommitCommand.php +++ b/app/Commands/CommitCommand.php @@ -116,7 +116,7 @@ function ($attempts) use ($cachedDiff, $type): string { return $content; }) ->tap(function (Collection $message): void { - $message = $message->put('', null)->sortKeysUsing(static function (string $a, string $b): int { + $message = $message->put('', '')->sortKeysUsing(static function (string $a, string $b): int { $rules = ['subject', '', 'body']; return array_search($a, $rules, true) <=> array_search($b, $rules, true);