From 4e46e90ef7cca9ab5b9f2ddcc260f1423265dbab Mon Sep 17 00:00:00 2001
From: Andrew Dolgov <fox@madoka.volgo-balt.ru>
Date: Wed, 29 May 2013 00:32:23 +0400
Subject: [PATCH] installer: use mysqli_error when using mysqli (closes #696)

---
 install/index.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/install/index.php b/install/index.php
index efa917d95..06f13fe14 100644
--- a/install/index.php
+++ b/install/index.php
@@ -191,7 +191,7 @@
 			if (!$result) {
 				$query = htmlspecialchars($query);
 				if ($die_on_error) {
-					die("Query <i>$query</i> failed: " . ($link ? mysql_error($link) : "No connection"));
+					die("Query <i>$query</i> failed: " . ($link ? function_exists("mysqli_connect") ? mysqli_error($link) : mysql_error($link) : "No connection"));
 				}
 			}
 			return $result;
-- 
GitLab