diff --git a/src/applications/diffusion/request/DiffusionRequest.php b/src/applications/diffusion/request/DiffusionRequest.php index ae7b4b8eea..d61c5b63bf 100644 --- a/src/applications/diffusion/request/DiffusionRequest.php +++ b/src/applications/diffusion/request/DiffusionRequest.php @@ -277,7 +277,9 @@ abstract class DiffusionRequest { 'repositoryID = %d AND commitIdentifier = %s', $repository->getID(), $this->getCommit()); - $commit->attachRepository($repository); + if ($commit) { + $commit->attachRepository($repository); + } $this->repositoryCommit = $commit; } return $this->repositoryCommit;