]> git.wh0rd.org - tt-rss.git/commitdiff
installer: use mysqli_error when using mysqli (closes #696)
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Tue, 28 May 2013 20:32:23 +0000 (00:32 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Tue, 28 May 2013 20:32:23 +0000 (00:32 +0400)
install/index.php

index efa917d95357373767b20ee44277a5f43dee9460..06f13fe142a9626a044f513d87c08767c2dc4260 100644 (file)
                        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;