Hide error message from HTTP servers

This commit is contained in:
Jakub Vrana
2025-02-18 08:16:53 +01:00
parent 578c9fca92
commit 51dbfb6987
5 changed files with 9 additions and 19 deletions

View File

@@ -17,8 +17,6 @@ if (isset($_GET["elastic"])) {
* @return array|false
*/
function rootQuery($path, array $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,
'content' => $content !== null ? json_encode($content) : null,