Error code for #4200

This commit is contained in:
James Cole 2020-12-30 11:59:10 +01:00
parent 9325b628fd
commit a19e116a15
No known key found for this signature in database
GPG Key ID: B5669F9493CDE38D

View File

@ -52,6 +52,10 @@ class SetCategory implements ActionInterface
{ {
$user = User::find($journal['user_id']); $user = User::find($journal['user_id']);
$search = $this->action->action_value; $search = $this->action->action_value;
if(null === $user) {
Log::error(sprintf('Journal has no valid user ID so action SetCategory("%s") cannot be applied', $search), $journal);
return false;
}
/** @var CategoryFactory $factory */ /** @var CategoryFactory $factory */
$factory = app(CategoryFactory::class); $factory = app(CategoryFactory::class);