Skip to content

EspoCRM – Open Source CRM Application

Ref

Yuriif799137e8893
diff --git a/application/Espo/Tools/Pdf/Dompdf/ImageSourceProvider.php b/application/Espo/Tools/Pdf/Dompdf/ImageSourceProvider.php
index 62fbb79700..b8d7f7ed18 100644
--- a/application/Espo/Tools/Pdf/Dompdf/ImageSourceProvider.php
+++ b/application/Espo/Tools/Pdf/Dompdf/ImageSourceProvider.php
@@ -45,8 +45,7 @@ class ImageSourceProvider
public function get(string $id): ?string
{
- /** @var Attachment $attachment */
- $attachment = $this->entityManager->getEntityById(Attachment::ENTITY_TYPE, $id);
+ $attachment = $this->entityManager->getRDBRepositoryByClass(Attachment::class)->getById($id);
if (!$attachment) {
return null;