]> git.joonet.de Git - adminer.git/commitdiff
Elasticsearch: allow empty server name
authorJakub Vrana <jakub@vrana.cz>
Mon, 20 Feb 2017 17:07:30 +0000 (18:07 +0100)
committerJakub Vrana <jakub@vrana.cz>
Tue, 21 Feb 2017 11:07:13 +0000 (12:07 +0100)
adminer/drivers/elastic.inc.php

index c6398d48a327315804d01911d95fc9ce7cd87f29..3ab5c43d6f8e709a814a2b6b3628349713f26e42 100644 (file)
@@ -59,7 +59,7 @@ if (isset($_GET["elastic"])) {
                        }
 
                        function connect($server, $username, $password) {
-                               preg_match('~^(https?://)?(.+)~', $server, $match);
+                               preg_match('~^(https?://)?(.*)~', $server, $match);
                                $this->_url = ($match[1] ? $match[1] : "http://") . "$username:$password@$match[2]/";
                                $return = $this->query('');
                                if ($return) {