Skip to content

Commit

Permalink
fix: null title error
Browse files Browse the repository at this point in the history
  • Loading branch information
SychO9 committed Nov 4, 2024
1 parent c754ced commit b3a4011
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion framework/core/src/Discussion/Discussion.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,10 @@ public static function start(?string $title, User $user): static
{
$discussion = new static;

$discussion->title = $title;
if ($title) {
$discussion->title = $title;
}

$discussion->created_at = Carbon::now();
$discussion->user_id = $user->id;

Expand Down

0 comments on commit b3a4011

Please sign in to comment.