diff options
Diffstat (limited to 'apps/files_external/3rdparty/icewind/streams/src/Path.php')
-rw-r--r-- | apps/files_external/3rdparty/icewind/streams/src/Path.php | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/apps/files_external/3rdparty/icewind/streams/src/Path.php b/apps/files_external/3rdparty/icewind/streams/src/Path.php index bef9fd5f616..46d2156b69a 100644 --- a/apps/files_external/3rdparty/icewind/streams/src/Path.php +++ b/apps/files_external/3rdparty/icewind/streams/src/Path.php @@ -56,7 +56,7 @@ class Path { protected function register() { if (!$this->registered) { - $this->appendDefaultContent($this->contextOptions); + $this->appendDefaultContent($this->getProtocol(), $this->contextOptions); stream_wrapper_register($this->getProtocol(), $this->class); $this->registered = true; } @@ -71,17 +71,13 @@ class Path { /** * Add values to the default stream context * + * @param string $key * @param array $values */ - protected function appendDefaultContent($values) { - if (!is_array(current($values))) { - $values = array($this->getProtocol() => $values); - } + protected function appendDefaultContent($key, $values) { $context = stream_context_get_default(); $defaults = stream_context_get_options($context); - foreach ($values as $key => $value) { - $defaults[$key] = $value; - } + $defaults[$key] = $values; stream_context_set_default($defaults); } |