From 629ca0df2eb0784fc90b812bb17c32d586ab3ade Mon Sep 17 00:00:00 2001 From: Patrick McAndrew Date: Mon, 16 Jun 2014 12:59:09 +0100 Subject: [PATCH 1/2] make sure headers is set prior to accessing --- Client.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Client.php b/Client.php index 3eb98fe..cfcfea6 100644 --- a/Client.php +++ b/Client.php @@ -28,7 +28,7 @@ class Client extends ElasticaClient 'host' => $connection->getHost(), 'port' => $connection->getPort(), 'transport' => $connection->getTransport(), - 'headers' => $connection->getConfig('headers'), + 'headers' => $connection->hasConfig('headers')?$connection->getConfig('headers'):array(), ); $this->_logger->logQuery($path, $method, $data, $time, $connection_array, $query); From 934c6af8b8254c9f8be328ec842922a330e8c681 Mon Sep 17 00:00:00 2001 From: Patrick McAndrew Date: Mon, 16 Jun 2014 14:30:03 +0100 Subject: [PATCH 2/2] make PSR2 compliant --- Client.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Client.php b/Client.php index cfcfea6..265773a 100644 --- a/Client.php +++ b/Client.php @@ -28,7 +28,7 @@ class Client extends ElasticaClient 'host' => $connection->getHost(), 'port' => $connection->getPort(), 'transport' => $connection->getTransport(), - 'headers' => $connection->hasConfig('headers')?$connection->getConfig('headers'):array(), + 'headers' => $connection->hasConfig('headers') ? $connection->getConfig('headers') : array(), ); $this->_logger->logQuery($path, $method, $data, $time, $connection_array, $query);