REF - Cleanup array key checking to use array_key_exists
[civicrm-core.git] / CRM / Contact / Page / ImageFile.php
index da437de7d5248f52e110fcad7692a59bb38c3ebc..9c21181f593aafbd93d7d8d5a5d28d4562d62106 100644 (file)
@@ -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();
   }
 
   /**