From 5a349ee9fa7a324e15876d20beb412743a1b3649 Mon Sep 17 00:00:00 2001
From: Prasad <prasad@vtiger.com>
Date: Mon, 19 Jun 2023 08:51:51 +0530
Subject: [PATCH] Fixes #1753: Using count in Loader instead of compat

---
 includes/Loader.php | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/includes/Loader.php b/includes/Loader.php
index 7e2ad2b85..e4019596f 100644
--- a/includes/Loader.php
+++ b/includes/Loader.php
@@ -117,7 +117,7 @@ class Vtiger_Loader {
 			$moduleHierarchyParts = explode(':', $moduleName);
 			$moduleDir = str_replace(':', '.', $moduleName);
 			$moduleClassPath = str_replace(':', '_', $moduleName);
-			$actualModule = $moduleHierarchyParts[php7_count($moduleHierarchyParts)-1];
+			$actualModule = $moduleHierarchyParts[count($moduleHierarchyParts)-1];
 			$secondFallBackModuleDir= $secondFallBackModuleClassPath =  $actualModule;
 			$modules = array('Users');
 			if($actualModule != 'Users') {
@@ -171,7 +171,7 @@ class Vtiger_Loader {
 	 */
 	public static function autoLoad($className) {
 		$parts = explode('_', $className);
-		$noOfParts = php7_count($parts);
+		$noOfParts = count($parts);
 		if($noOfParts > 2) {
 			$filePath = 'modules.';
 			// Append modules and sub modules names to the path
@@ -199,4 +199,4 @@ function vimport_path($qualifiedName) {
 	return Vtiger_Loader::includePath($qualifiedName);
 }
 
-spl_autoload_register('Vtiger_Loader::autoLoad');
\ No newline at end of file
+spl_autoload_register('Vtiger_Loader::autoLoad');
-- 
GitLab