]> git.joonet.de Git - adminer.git/commitdiff
Don't create Driver with connection error
authorJakub Vrana <jakub@vrana.cz>
Sat, 8 Mar 2025 04:37:01 +0000 (05:37 +0100)
committerJakub Vrana <jakub@vrana.cz>
Sat, 8 Mar 2025 04:37:01 +0000 (05:37 +0100)
adminer/include/auth.inc.php

index 9244d28dfae9cd27f1be491b179b21dec62caa4d..a082e9bbf5c8821661110c91bc4c14c16374e333 100644 (file)
@@ -164,9 +164,11 @@ if (isset($_GET["username"]) && is_string(get_password())) {
        }
        check_invalid_login();
        $connection = connect($adminer->credentials());
-       $driver = new Driver($connection);
-       if ($adminer->operators === null) {
-               $adminer->operators = $driver->operators;
+       if (is_object($connection)) {
+               $driver = new Driver($connection);
+               if ($adminer->operators === null) {
+                       $adminer->operators = $driver->operators;
+               }
        }
 }