diff --git a/application/Espo/EntryPoints/Avatar.php b/application/Espo/EntryPoints/Avatar.php index c95672c0c8..9a98997d78 100644 --- a/application/Espo/EntryPoints/Avatar.php +++ b/application/Espo/EntryPoints/Avatar.php @@ -77,7 +77,15 @@ class Avatar extends Image $user = $this->getEntityManager()->getEntity('User', $userId); if (!$user) { - throw new NotFound(); + header('Content-Type: image/png'); + $img = imagecreatetruecolor(14, 14); + imagesavealpha($img, true); + $color = imagecolorallocatealpha($img, 127, 127, 127, 127); + imagefill($img, 0, 0, $color); + imagepng($img); + imagecolordeallocate($img, $color); + imagedestroy($img); + exit; } if (isset($_GET['attachmentId'])) { diff --git a/application/Espo/Modules/Crm/EntryPoints/CampaignTrackOpened.php b/application/Espo/Modules/Crm/EntryPoints/CampaignTrackOpened.php index e510f955a8..03f3ecb2b9 100644 --- a/application/Espo/Modules/Crm/EntryPoints/CampaignTrackOpened.php +++ b/application/Espo/Modules/Crm/EntryPoints/CampaignTrackOpened.php @@ -86,11 +86,11 @@ class CampaignTrackOpened extends \Espo\Core\EntryPoints\Base $img = imagecreatetruecolor(1, 1); imagesavealpha($img, true); - $color = imagecolorallocatealpha($img, 0, 0, 0, 127); + $color = imagecolorallocatealpha($img, 127, 127, 127, 127); imagefill($img, 0, 0, $color); imagepng($img); - imagecolordeallocate($color); + imagecolordeallocate($img, $color); imagedestroy($img); } }