diff --git a/adminer/drivers/elastic.inc.php b/adminer/drivers/elastic.inc.php index 97d08954e..3e7dd060e 100644 --- a/adminer/drivers/elastic.inc.php +++ b/adminer/drivers/elastic.inc.php @@ -14,7 +14,7 @@ class Min_DB { * @param string * @return mixed */ - function rootQuery($path, $content = array(), $method = 'GET') { + function rootQuery($path, $content = null, $method = 'GET') { @ini_set('track_errors', 1); // @ - may be disabled $file = @file_get_contents("$this->_url/" . ltrim($path, '/'), false, stream_context_create(array('http' => array( 'method' => $method, @@ -59,7 +59,7 @@ function rootQuery($path, $content = array(), $method = 'GET') { * @param string * @return mixed */ - function query($path, $content = array(), $method = 'GET') { + function query($path, $content = null, $method = 'GET') { // Support for global search through all tables if ($path[0] == "S" && preg_match('/SELECT 1 FROM ([^ ]+) WHERE (.+) LIMIT ([0-9]+)/', $path, $matches)) { global $driver; @@ -467,7 +467,7 @@ function create_database($db) { */ function drop_databases($databases) { global $connection; - return $connection->rootQuery(urlencode(implode(',', $databases)), array(), 'DELETE'); + return $connection->rootQuery(urlencode(implode(',', $databases)), null, 'DELETE'); } /** Alter type @@ -498,7 +498,7 @@ function drop_tables($tables) { global $connection; $return = true; foreach ($tables as $table) { //! convert to bulk api - $return = $return && $connection->query(urlencode($table), array(), 'DELETE'); + $return = $return && $connection->query(urlencode($table), null, 'DELETE'); } return $return; }