From 605927d346f4ccfc61bcd75129c05f7b5a2f7754 Mon Sep 17 00:00:00 2001
From: Prasad <prasad@vtiger.com>
Date: Thu, 12 Sep 2024 20:14:57 +0530
Subject: [PATCH] Fixed datatype check for tag parameter

---
 modules/Documents/views/List.php | 1 +
 modules/Vtiger/views/List.php    | 4 +++-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/modules/Documents/views/List.php b/modules/Documents/views/List.php
index ea7387a26..b44363d1e 100644
--- a/modules/Documents/views/List.php
+++ b/modules/Documents/views/List.php
@@ -55,6 +55,7 @@ class Documents_List_View extends Vtiger_List_View {
 		 $tagParams = $request->get('tag_params');
 		$listHeaders = $request->get('list_headers', array());
 		$tag = $request->get('tag');
+		if (!is_numeric($tag)) $tag = "";
 		$requestViewName = $request->get('viewname');
 		$tagSessionKey = $moduleName.'_TAG';
 
diff --git a/modules/Vtiger/views/List.php b/modules/Vtiger/views/List.php
index faf167abf..82af411b4 100644
--- a/modules/Vtiger/views/List.php
+++ b/modules/Vtiger/views/List.php
@@ -48,6 +48,7 @@ class Vtiger_List_View extends Vtiger_Index_View {
 		}
 		$listHeaders = $request->get('list_headers', array());
 		$tag = $request->get('tag');
+		if (!is_numeric($tag)) $tag = "";
 
 		$listViewSessionKey = $moduleName.'_'.$cvId;
 		if(!empty($tag)) {
@@ -177,6 +178,7 @@ class Vtiger_List_View extends Vtiger_Index_View {
 			$starFilterMode = $request->get('starFilterMode');
 			$listHeaders = $request->get('list_headers', array());
 			$tag = $request->get('tag');
+			if (!is_numeric($tag)) $tag = "";
 			$requestViewName = $request->get('viewname');
 			$tagSessionKey = $moduleName.'_TAG';
                 
@@ -577,4 +579,4 @@ class Vtiger_List_View extends Vtiger_Index_View {
 
 		return $recordActions;
 	}
-}
\ No newline at end of file
+}
-- 
GitLab