Handle enhanced config in a more graceful way.

HttpSocket further munges the host into a nested array. This config
value should be preferred over the top level host config.

Refs #7675
This commit is contained in:
mark_story 2015-11-11 22:51:17 -05:00
parent f8e7634131
commit 079d15d54f

View file

@ -134,7 +134,12 @@ class CakeSocket {
$scheme = $this->config['protocol'] . '://';
}
$this->_setSslContext($this->config['request']['uri']['host']);
$host = $this->config['host'];
if (isset($this->config['request']['uri']['host'])) {
$host = $this->config['request']['uri']['host'];
}
$this->_setSslContext($host);
if (!empty($this->config['context'])) {
$context = stream_context_create($this->config['context']);
} else {