Fixed exception during data fixtures loading.

This commit is contained in:
Jan Böhmer 2020-02-03 13:33:15 +01:00
parent eb071b1780
commit 46772c4ef3

View file

@ -61,6 +61,11 @@ class EventLogger
$repo = $this->em->getRepository(User::class);
$user = $repo->getAnonymousUser();
}
//If no anonymous user is available skip the log (needed for data fixtures)
if (null === $user) {
return false;
}
$logEntry->setUser($user);
}