diff --git a/include/utils/VtlibUtils.php b/include/utils/VtlibUtils.php
index 7e3629c6c8d8f9da97f9482e4621127f49d81e6f..f8054c1d07c64437082fc1465fab8cf86b852e1b 100644
--- a/include/utils/VtlibUtils.php
+++ b/include/utils/VtlibUtils.php
@@ -665,6 +665,7 @@ function vtlib_purify($input, $ignore = false) {
     static $purified_cache = array();
     $value = $input;
 
+	$encryptInput = null;
     if (!is_array($input)) {
         $encryptInput = hash('sha256',$input);
         if (array_key_exists($encryptInput, $purified_cache)) {
@@ -718,8 +719,10 @@ function vtlib_purify($input, $ignore = false) {
                 $value = purifyHtmlEventAttributes($value, true);
             }
         }
-        $purified_cache[$encryptInput] = $value;
-    }
+        if ($encryptInput != null) {
+			$purified_cache[$encryptInput] = $value;
+    	}
+	}
 
 	if ($value && !is_array($value)) {
 		$value = str_replace('&', '&', $value);
diff --git a/modules/Users/CreateUserPrivilegeFile.php b/modules/Users/CreateUserPrivilegeFile.php
index 530275f2a690e257b77b4caf3c7fa832676d9a6f..6f6a6f6ae738d45daea56b4b2a8acfb760970db1 100644
--- a/modules/Users/CreateUserPrivilegeFile.php
+++ b/modules/Users/CreateUserPrivilegeFile.php
@@ -39,7 +39,9 @@ function createUserPrivilegesfile($userid)
 		$user_focus->id = $userid; 
 		foreach($user_focus->column_fields as $field=>$value_iter)
         	{
-               		$userInfo[$field]= $user_focus->$field;
+               		if (property_exists($user_focus, $field)) {
+						$userInfo[$field]= $user_focus->$field;
+					}
         	}
 
 		if($user_focus->is_admin == 'on')
diff --git a/modules/Users/Users.php b/modules/Users/Users.php
index d9dd37481aff959244d038378e0d7b4b086dad1c..3166680b50f19412d26b89fe1b083a4d4eba87d6 100755
--- a/modules/Users/Users.php
+++ b/modules/Users/Users.php
@@ -751,7 +751,7 @@ class Users extends CRMEntity {
 	function insertIntoEntityTable($table_name, $module, $fileid='') {
 		global $log;
 		$log->info("function insertIntoEntityTable ".$module.' vtiger_table name ' .$table_name);
-		global $adb, $current_user;
+		global $adb, $current_user, $app_strings;
 		$insertion_mode = $this->mode;
 		//Checkin whether an entry is already is present in the vtiger_table to update
 		if($insertion_mode == 'edit') {
@@ -824,7 +824,7 @@ class Users extends CRMEntity {
 					}
 
 				}elseif($uitype == 15) {
-					if($this->column_fields[$fieldname] == $app_strings['LBL_NOT_ACCESSIBLE']) {
+					if($app_strings && $this->column_fields[$fieldname] == $app_strings['LBL_NOT_ACCESSIBLE']) {
 						//If the value in the request is Not Accessible for a picklist, the existing value will be replaced instead of Not Accessible value.
 						$sql="select $columname from  $table_name where ".$this->tab_name_index[$table_name]."=?";
 						$res = $adb->pquery($sql,array($this->id));
@@ -1325,11 +1325,12 @@ class Users extends CRMEntity {
 		global $log,$adb;
 		$log->debug("Entering in function saveHomeOrder($id)");
 
+		$save_array = array();
 		 if($this->mode == 'edit')
 		 {
 			 for($i = 0;$i < php7_count($this->homeorder_array);$i++)
 			 {
-				 if($_REQUEST[$this->homeorder_array[$i]] != '')
+				 if(isset($_REQUEST[$this->homeorder_array[$i]]) && $_REQUEST[$this->homeorder_array[$i]] != '')
 				 {
 					$save_array[] = $this->homeorder_array[$i];
 					$qry=" update vtiger_homestuff,vtiger_homedefault set vtiger_homestuff.visible=0 where vtiger_homestuff.stuffid=vtiger_homedefault.stuffid and vtiger_homestuff.userid=? and vtiger_homedefault.hometype=?";//To show the default Homestuff on the the Home Page
@@ -1341,7 +1342,7 @@ class Users extends CRMEntity {
 					$result=$adb->pquery($qry, array($id, $this->homeorder_array[$i]));
 				}
 			}
-			if($save_array !="")
+			if($save_array)
 				$homeorder = implode(',',$save_array);
 		}
 		 else
diff --git a/vtlib/Vtiger/Deprecated.php b/vtlib/Vtiger/Deprecated.php
index 3dacc5148b11db997015d20da81ef67be4160105..d65cca2abf98120775fe0975e7ef7c1bd7f38733 100644
--- a/vtlib/Vtiger/Deprecated.php
+++ b/vtlib/Vtiger/Deprecated.php
@@ -342,7 +342,7 @@ class Vtiger_Deprecated {
 
 	static function SaveTagCloudView($id = "") {
 		global $adb;
-		$tag_cloud_status = $_REQUEST['tagcloudview'];
+		$tag_cloud_status = isset($_REQUEST['tagcloudview']) ? $_REQUEST['tagcloudview'] : false;
 		if ($tag_cloud_status == "true") {
 			$tag_cloud_view = 0;
 		} else {