mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
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:
parent
f8e7634131
commit
079d15d54f
1 changed files with 6 additions and 1 deletions
|
@ -134,7 +134,12 @@ class CakeSocket {
|
||||||
$scheme = $this->config['protocol'] . '://';
|
$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'])) {
|
if (!empty($this->config['context'])) {
|
||||||
$context = stream_context_create($this->config['context']);
|
$context = stream_context_create($this->config['context']);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue