From: Jakub Vrana Date: Mon, 20 Feb 2017 17:07:30 +0000 (+0100) Subject: Elasticsearch: allow empty server name X-Git-Tag: v4.3.0~17 X-Git-Url: https://git.joonet.de/?a=commitdiff_plain;h=8a9df8ede19c6bcad994c28fded37498948caeb9;p=adminer.git Elasticsearch: allow empty server name --- 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) {