From 7ce284306ba3922fbdf843376b7cd8d3c0e7469c Mon Sep 17 00:00:00 2001
From: Prasad <prasad@vtiger.com>
Date: Tue, 22 Nov 2022 11:40:06 +0530
Subject: [PATCH] PHP 8.x - Ensure array key init before use

---
 include/Webservices/VTQL_Parser.php | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/include/Webservices/VTQL_Parser.php b/include/Webservices/VTQL_Parser.php
index ecd4e2517..0537eda0f 100644
--- a/include/Webservices/VTQL_Parser.php
+++ b/include/Webservices/VTQL_Parser.php
@@ -205,6 +205,9 @@ function buildSelectStmt($sqlDump){
 	$accessControlQuery = $meta->getEntityAccessControlQuery();
 	$this->query = $this->query.' '.$accessControlQuery;
 	if($sqlDump['where_condition']){
+		// ensure init before use
+		if(!isset($sqlDump['where_condition']['operators'])) $sqlDump['where_condition']['operators'] = array();
+
 		if((sizeof($sqlDump['where_condition']['column_names']) == 
 		sizeof($sqlDump['where_condition']['column_values'])) && 
 		(sizeof($sqlDump['where_condition']['column_operators']) == sizeof($sqlDump['where_condition']['operators'])+1)){
-- 
GitLab