mirror of
https://github.com/flarum/core.git
synced 2025-07-26 03:01:22 +02:00
fix(approval): posts approved for deleted users error
In certain edge cases posts get approved through moderative action and throws an error when the user has already been deleted. Ref: DISCUSS-11K on sentry
This commit is contained in:
@@ -69,7 +69,9 @@ class ApproveContent
|
|||||||
|
|
||||||
$discussion->save();
|
$discussion->save();
|
||||||
|
|
||||||
|
if ($discussion->user) {
|
||||||
$user->refreshCommentCount();
|
$user->refreshCommentCount();
|
||||||
$user->save();
|
$user->save();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
Reference in New Issue
Block a user