From 3fe8963f76f89f6e7025152cc97b88766064be85 Mon Sep 17 00:00:00 2001
From: Dries Buytaert <dries@buytaert.net>
Date: Mon, 25 Aug 2008 07:47:12 +0000
Subject: [PATCH] - Patch #298391 by catch, chx: fixed database initialization
 during install failure.

---
 includes/install.inc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/includes/install.inc b/includes/install.inc
index ce9e310a7e87..658ef26a2af8 100644
--- a/includes/install.inc
+++ b/includes/install.inc
@@ -215,7 +215,8 @@ function drupal_detect_database_types() {
   // file for the driver explicitly.
   foreach (glob('./includes/database/*/{install,database}.inc', GLOB_BRACE) as $file) {
     include_once($file);
-    $drivers[max(explode('/', $file, -1))] = $file;
+    $dir_parts = explode('/', $file, -1);
+    $drivers[end($dir_parts)] = $file;
   }
 
   foreach ($drivers as $driver => $file) {
-- 
GitLab