diff --git a/include/fields/CurrencyField.php b/include/fields/CurrencyField.php
index 294438a77efaaac85382768bacc8b5a88feb36f2..ebad60bdec83691d1c232ee2702454f505cf10c8 100644
--- a/include/fields/CurrencyField.php
+++ b/include/fields/CurrencyField.php
@@ -125,6 +125,7 @@ class CurrencyField {
     public static function convertToUserFormat($value, $user=null, $skipConversion=false, $skipFormatting=false) {
 		// To support negative values
 		$negative = false;
+		if(!$value) return $value;
 		if(stripos($value, '-') === 0) {
 			$negative = true;
 			$value = substr($value, 1);
diff --git a/modules/Emails/Emails.php b/modules/Emails/Emails.php
index 655ce2c37f0a2bea8be9c2ead0b54bce540f653c..3663836f036d827a98a6cfc1df4a74fb7dae0848 100644
--- a/modules/Emails/Emails.php
+++ b/modules/Emails/Emails.php
@@ -181,7 +181,7 @@ class Emails extends CRMEntity {
 			//This is to added to store the existing attachment id of the contact where we should delete this when we give new image
 			foreach ($_FILES as $fileindex => $files) {
 				if ($files['name'] != '' && $files['size'] > 0) {
-					$files['original_name'] = vtlib_purify($_REQUEST[$fileindex . '_hidden']);
+					$files['original_name'] = isset($_REQUEST[$fileindex . '_hidden']) ? vtlib_purify($_REQUEST[$fileindex . '_hidden']):"";
 					$file_saved = $this->uploadAndSaveFile($id, $module, $files);
 				}
 			}
diff --git a/modules/Emails/models/Mailer.php b/modules/Emails/models/Mailer.php
index 71d7905064caeb5a9bce850ff49a702f74a69e6b..8741cdbce83f3def4a4d37c562c7d94bf499ec1e 100644
--- a/modules/Emails/models/Mailer.php
+++ b/modules/Emails/models/Mailer.php
@@ -12,7 +12,7 @@ include_once 'include/simplehtmldom/simple_html_dom.php';
 include_once 'libraries/InStyle/InStyle.php';
 include_once 'libraries/ToAscii/ToAscii.php';
 include_once 'include/database/PearDatabase.php';
-
+#[\AllowDynamicProperties]
 class Emails_Mailer_Model extends Vtiger_Mailer {
 
 	private $dom = null;
@@ -36,10 +36,13 @@ class Emails_Mailer_Model extends Vtiger_Mailer {
 	 */
 	public static function makeImageURLValid($htmlContent) {
 		$doc = new DOMDocument();
+		// set error level
+ 		$internalErrors = libxml_use_internal_errors(true);
 		$imageUrls = array();
 		if (!empty($htmlContent)) {
 			@$doc->loadHTML($htmlContent);
 			$tags = $doc->getElementsByTagName('img');
+			libxml_use_internal_errors($internalErrors);
 			foreach ($tags as $tag) {
 				$imageUrl = $tag->getAttribute('src');
 				$imageUrls[$imageUrl] = str_replace(" ", "%20", $imageUrl);
diff --git a/modules/HelpDesk/HelpDesk.php b/modules/HelpDesk/HelpDesk.php
index bc752466b0019d5d413c0cef9c3b7b5de78059a1..324584655ecbc47abe2a30cebd39e0425898e803 100644
--- a/modules/HelpDesk/HelpDesk.php
+++ b/modules/HelpDesk/HelpDesk.php
@@ -122,9 +122,9 @@ class HelpDesk extends CRMEntity {
 		$this->insertIntoAttachment($this->id,$module);
 
 		//service contract update
-		$return_action = $_REQUEST['return_action'];
-		$for_module = $_REQUEST['return_module'];
-		$for_crmid  = $_REQUEST['return_id'];
+		$return_action = isset($_REQUEST['return_action']) ? $_REQUEST['return_action'] : "";
+		$for_module = isset($_REQUEST['return_module']) ? $_REQUEST['return_module'] : "";
+		$for_crmid  = isset($_REQUEST['return_id']) ? $_REQUEST['return_id'] : "";
 		if ($return_action && $for_module && $for_crmid) {
 			if ($for_module == 'ServiceContracts') {
 				$on_focus = CRMEntity::getInstance($for_module);
diff --git a/modules/com_vtiger_workflow/VTJsonCondition.inc b/modules/com_vtiger_workflow/VTJsonCondition.inc
index 8da1bb117656c5119c95b1b843efb12b5dd89eb8..bfdf408b08ab70a3d8e42f070f283f15bf4cd3b4 100644
--- a/modules/com_vtiger_workflow/VTJsonCondition.inc
+++ b/modules/com_vtiger_workflow/VTJsonCondition.inc
@@ -32,7 +32,7 @@ class VTJsonCondition {
 				}
 				preg_match('/(\w+) : \((\w+)\) (\w+)/', $cond['fieldname'], $matches);
 				if (php7_count($matches) == 0) {
-					if ($cond['fieldname'] == '_VT_add_comment' && $cond['isEvaluated']) {
+					if (isset($cond['isEvaluated']) && $cond['fieldname'] == '_VT_add_comment' && $cond['isEvaluated']) {
 						$expressionResults[$conditionGroup][$i]['result'] = $cond['isEvaluated'];
 					} else {
 						$expressionResults[$conditionGroup][$i]['result'] = $this->checkCondition($entityData, $cond);
@@ -159,7 +159,7 @@ class VTJsonCondition {
 			}
 			$rawFieldValue = $fieldValue;
 		} else {
-			$fieldValue = $data[$cond['fieldname']];
+			$fieldValue = isset($data[$cond['fieldname']]) ? $data[$cond['fieldname']]:"";
 		}
 		$value = trim(html_entity_decode($cond['value']));
 		$expressionType = isset($cond['valuetype']) ? $cond['valuetype'] : null;
@@ -191,7 +191,7 @@ class VTJsonCondition {
 		global $current_user;
 		$handler = vtws_getModuleHandlerFromName($entityData->getModuleName(), $current_user);
 		$moduleFields = $handler->getMeta()->getModuleFields();
-		$fieldInstance = $moduleFields[$cond['fieldname']];
+		$fieldInstance = isset($moduleFields[$cond['fieldname']])?$moduleFields[$cond['fieldname']]:"";
 
 		if($fieldInstance && $fieldInstance->getFieldDataType() == 'datetime') {
 			//Convert the DB Date Time Format to User Date Time Format
diff --git a/pkg/vtiger/modules/ServiceContracts/modules/ServiceContracts/ServiceContractsHandler.php b/pkg/vtiger/modules/ServiceContracts/modules/ServiceContracts/ServiceContractsHandler.php
index 164932acbf61c0935296845e69b06633081d249d..bb1777499c01d93e959604e850abda3755e89291 100644
--- a/pkg/vtiger/modules/ServiceContracts/modules/ServiceContracts/ServiceContractsHandler.php
+++ b/pkg/vtiger/modules/ServiceContracts/modules/ServiceContracts/ServiceContractsHandler.php
@@ -44,7 +44,7 @@ class ServiceContractsHandler extends VTEventHandler {
 			$moduleName = $entityData->getModuleName();
 			
 			// Update Used Units for the Service Contract, everytime the status of a ticket related to the Service Contract changes
-			if ($moduleName == 'HelpDesk' && $_REQUEST['return_module'] != 'ServiceContracts') {
+			if (isset($_REQUEST['return_module']) && $moduleName == 'HelpDesk' && $_REQUEST['return_module'] != 'ServiceContracts') {
 				$ticketId = $entityData->getId();
 				$data = $entityData->getData();
 				if($data['ticketstatus'] != $entityData->oldStatus) {