From 1a662f35dbe459c6d978a53943bff2a5adf72d1d Mon Sep 17 00:00:00 2001 From: magnolia61 Date: Mon, 31 May 2021 15:16:54 +0200 Subject: [PATCH] change missing image fatal error to 404 --- CRM/Contact/Page/ImageFile.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CRM/Contact/Page/ImageFile.php b/CRM/Contact/Page/ImageFile.php index da437de7d5..9c21181f59 100644 --- a/CRM/Contact/Page/ImageFile.php +++ b/CRM/Contact/Page/ImageFile.php @@ -52,11 +52,11 @@ class CRM_Contact_Page_ImageFile extends CRM_Core_Page { 'image/' . ($fileExtension == 'jpg' ? 'jpeg' : $fileExtension), $this->ttl ); - CRM_Utils_System::civiExit(); } else { - throw new CRM_Core_Exception(ts('Photo does not exist')); + header("HTTP/1.0 404 Not Found"); } + CRM_Utils_System::civiExit(); } /** -- 2.25.1