From 2e792f9858b1b62d2dd7c0b45881529c78f8b413 Mon Sep 17 00:00:00 2001
From: yogeshwar <yogeshwar.g@vtigersolutions.com>
Date: Tue, 28 May 2024 12:41:22 +0530
Subject: [PATCH] E-all Inventory Modules

---
 modules/Vtiger/views/List.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/Vtiger/views/List.php b/modules/Vtiger/views/List.php
index db752a51e..faf167abf 100644
--- a/modules/Vtiger/views/List.php
+++ b/modules/Vtiger/views/List.php
@@ -57,7 +57,7 @@ class Vtiger_List_View extends Vtiger_Index_View {
                 $this->listViewModel = Vtiger_ListView_Model::getInstance($moduleName, $cvId, $listHeaders);
 		$orderParams = $this->listViewModel->getSortParamsSession($listViewSessionKey);
 
-		if(empty($listHeaders) && is_array($orderParams)) {
+		if(empty($listHeaders) && is_array($orderParams) && array_key_exists('list_headers', $orderParams)) {
 			$listHeaders = $orderParams['list_headers'];
 		}
 
@@ -221,7 +221,7 @@ class Vtiger_List_View extends Vtiger_Index_View {
 			$orderBy = '';
 			$sortOrder = '';
 		}
-		if(empty($listHeaders) && is_array($orderParams)) {
+		if(empty($listHeaders) && is_array($orderParams) && array_key_exists('list_headers', $orderParams)) {
 			$listHeaders = $orderParams['list_headers'];
 		}
                 
-- 
GitLab