From 8a9df8ede19c6bcad994c28fded37498948caeb9 Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Mon, 20 Feb 2017 18:07:30 +0100 Subject: [PATCH] Elasticsearch: allow empty server name --- adminer/drivers/elastic.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adminer/drivers/elastic.inc.php b/adminer/drivers/elastic.inc.php index c6398d48..3ab5c43d 100644 --- a/adminer/drivers/elastic.inc.php +++ b/adminer/drivers/elastic.inc.php @@ -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) {