mirror of
https://github.com/vrana/adminer.git
synced 2025-08-15 02:54:28 +02:00
Elastic 5: Do not set Content-Type without content
This commit is contained in:
@@ -17,8 +17,8 @@ if (isset($_GET["elastic5"])) {
|
|||||||
function rootQuery($path, $content = array(), $method = 'GET') {
|
function rootQuery($path, $content = array(), $method = 'GET') {
|
||||||
$file = @file_get_contents("$this->_url/" . ltrim($path, '/'), false, stream_context_create(array('http' => array(
|
$file = @file_get_contents("$this->_url/" . ltrim($path, '/'), false, stream_context_create(array('http' => array(
|
||||||
'method' => $method,
|
'method' => $method,
|
||||||
'content' => $content === null ? $content : json_encode($content),
|
'content' => $content !== null ? json_encode($content) : $content,
|
||||||
'header' => 'Content-Type: application/json',
|
'header' => $content !== null ? 'Content-Type: application/json' : array(),
|
||||||
'ignore_errors' => 1, // available since PHP 5.2.10
|
'ignore_errors' => 1, // available since PHP 5.2.10
|
||||||
'follow_location' => 0,
|
'follow_location' => 0,
|
||||||
'max_redirects' => 0,
|
'max_redirects' => 0,
|
||||||
|
Reference in New Issue
Block a user