From f452bc97922081639bfce4f4565337fb2a18661c Mon Sep 17 00:00:00 2001 From: prasad <prasad@vtiger.com> Date: Mon, 6 May 2024 00:55:14 +0530 Subject: [PATCH] E_ALL fixes AllowDynamicProperties, php 8.2 call conventions --- include/Webservices/WebserviceField.php | 4 ++-- include/events/SqlResultIterator.inc | 7 +++++++ include/events/VTEntityData.inc | 1 + include/events/VTEventCondition.php | 3 ++- include/events/VTEventTrigger.inc | 4 +++- modules/com_vtiger_workflow/VTTaskManager.inc | 2 ++ modules/com_vtiger_workflow/VTWorkflowManager.inc | 2 ++ vtlib/Vtiger/Link.php | 3 ++- 8 files changed, 21 insertions(+), 5 deletions(-) diff --git a/include/Webservices/WebserviceField.php b/include/Webservices/WebserviceField.php index 58018452b..d1ca206d4 100644 --- a/include/Webservices/WebserviceField.php +++ b/include/Webservices/WebserviceField.php @@ -62,7 +62,7 @@ class WebserviceField{ $this->isunique = isset($row['isunique']) && $row['isunique'] ? true : false; $typeOfData = isset($row['typeofdata'])? $row['typeofdata'] : null; $this->typeOfData = $typeOfData; - $typeOfData = explode("~",$typeOfData); + $typeOfData = explode("~",$typeOfData ? $typeOfData : ""); $this->mandatory = (php7_count($typeOfData) > 1 && $typeOfData[1] == 'M')? true: false; if($this->uitype == 4){ $this->mandatory = false; @@ -429,4 +429,4 @@ class WebserviceField{ } -?> \ No newline at end of file +?> diff --git a/include/events/SqlResultIterator.inc b/include/events/SqlResultIterator.inc index 11f4583d3..490b23801 100644 --- a/include/events/SqlResultIterator.inc +++ b/include/events/SqlResultIterator.inc @@ -8,7 +8,12 @@ * All Rights Reserved. *************************************************************************************/ + #[\AllowDynamicProperties] class SqlResultIterator implements Iterator{ + var $result; + var $adb; + var $pos; + function __construct($adb, $result){ $this->result = $result; $this->adb = $adb; @@ -79,6 +84,8 @@ } class SqlResultIteratorRow{ + var $data; + function __construct($data){ $this->data = $data; } diff --git a/include/events/VTEntityData.inc b/include/events/VTEntityData.inc index 853dbb785..8a87e4e0f 100644 --- a/include/events/VTEntityData.inc +++ b/include/events/VTEntityData.inc @@ -11,6 +11,7 @@ /** * A wrapper around CRMEntity instances */ +#[\AllowDynamicProperties] class VTEntityData{ private $isNew = false; diff --git a/include/events/VTEventCondition.php b/include/events/VTEventCondition.php index e16766401..40c8c74d2 100644 --- a/include/events/VTEventCondition.php +++ b/include/events/VTEventCondition.php @@ -8,6 +8,7 @@ * All Rights Reserved. *************************************************************************************/ + #[\AllowDynamicProperties] class VTEventCondition{ function __construct($expr){ if($expr!=''){ @@ -79,4 +80,4 @@ } } -?> \ No newline at end of file +?> diff --git a/include/events/VTEventTrigger.inc b/include/events/VTEventTrigger.inc index e54561548..09545ae10 100644 --- a/include/events/VTEventTrigger.inc +++ b/include/events/VTEventTrigger.inc @@ -9,6 +9,8 @@ *************************************************************************************/ require_once 'include/events/VTBatchEventTrigger.inc'; require_once("include/events/SqlResultIterator.inc"); + + #[\AllowDynamicProperties] class VTEventTrigger{ /* EventTrigger cache management */ @@ -168,4 +170,4 @@ return new self($adb, $triggerName); } } -?> \ No newline at end of file +?> diff --git a/modules/com_vtiger_workflow/VTTaskManager.inc b/modules/com_vtiger_workflow/VTTaskManager.inc index 8f7058f73..a41e04fe1 100644 --- a/modules/com_vtiger_workflow/VTTaskManager.inc +++ b/modules/com_vtiger_workflow/VTTaskManager.inc @@ -11,6 +11,7 @@ /** * Functionality to save and retrieve Tasks from the database. */ + #[\AllowDynamicProperties] class VTTaskManager{ function __construct($adb){ $this->adb = $adb; @@ -153,6 +154,7 @@ } + #[\AllowDynamicProperties] abstract class VTTask{ public abstract function doTask($data); public abstract function getFieldNames(); diff --git a/modules/com_vtiger_workflow/VTWorkflowManager.inc b/modules/com_vtiger_workflow/VTWorkflowManager.inc index 276150c4c..395df1cc4 100644 --- a/modules/com_vtiger_workflow/VTWorkflowManager.inc +++ b/modules/com_vtiger_workflow/VTWorkflowManager.inc @@ -12,6 +12,7 @@ require_once("VTJsonCondition.inc"); require_once 'include/utils/ConfigReader.php'; require_once 'includes/runtime/Cache.php'; +#[\AllowDynamicProperties] class VTWorkflowManager{ static $ON_FIRST_SAVE = 1; @@ -341,6 +342,7 @@ class VTWorkflowManager{ } } +#[\AllowDynamicProperties] class Workflow{ static $SCHEDULED_HOURLY = 1; static $SCHEDULED_DAILY = 2; diff --git a/vtlib/Vtiger/Link.php b/vtlib/Vtiger/Link.php index 878f21a23..278b3dc7b 100644 --- a/vtlib/Vtiger/Link.php +++ b/vtlib/Vtiger/Link.php @@ -15,7 +15,8 @@ include_once 'vtlib/Vtiger/LinkData.php'; * Provides API to handle custom links * @package vtlib */ -class Vtiger_Link { + #[\AllowDynamicProperties] + class Vtiger_Link { var $tabid; var $linkid; var $linktype; -- GitLab