1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-30 01:30:12 +02:00

Handle the situation when no driver is found

This can happen if Adminer for MySQL with existing login is replaced by Adminer for PostgreSQL.
This commit is contained in:
Peter Knut
2024-11-19 22:35:56 +01:00
parent 53799ff6ab
commit 2cafcd7fc8

View File

@@ -214,6 +214,12 @@ function auth_error($error) {
exit;
}
if (isset($_GET["username"]) && !DRIVER) {
page_header(lang('No driver'), lang('Database driver not found.'), false);
page_footer("auth");
exit;
}
if (isset($_GET["username"]) && !class_exists("Min_DB")) {
unset($_SESSION["pwds"][DRIVER]);
unset_permanent();