diff --git a/system/Database/SQLSRV/Builder.php b/system/Database/SQLSRV/Builder.php index f01e733f9119..baa4e0406c7f 100755 --- a/system/Database/SQLSRV/Builder.php +++ b/system/Database/SQLSRV/Builder.php @@ -295,8 +295,8 @@ private function getFullName(string $table): string $database = $this->db->getDatabase(); $table = $dbInfo[0]; - if (count($dbInfo) >= 2) { - if (count($dbInfo) === 3) { + if (count($dbInfo) >= 2 && isset($dbInfo[1])) { + if (count($dbInfo) === 3 && isset($dbInfo[2])) { $database = str_replace('"', '', $dbInfo[0]); $schema = str_replace('"', '', $dbInfo[1]); $tableName = str_replace('"', '', $dbInfo[2]);