diff options
author | Robin Appelman <robin@icewind.nl> | 2017-01-19 16:41:20 +0300 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2017-01-19 16:41:20 +0300 |
commit | e9badb9f83743dc644e19eef59a76c1691c3b65f (patch) | |
tree | 2431416a1629c8f4880bd5e8e2b7123800dbe9f8 /apps/files_external/3rdparty | |
parent | d5728b3f117ff3b7ab45a4672f4999f7225b875b (diff) |
Revert "update icewind/streams to 0.5.2"
This reverts commit d5728b3f117ff3b7ab45a4672f4999f7225b875b.
Diffstat (limited to 'apps/files_external/3rdparty')
10 files changed, 57 insertions, 135 deletions
diff --git a/apps/files_external/3rdparty/composer.json b/apps/files_external/3rdparty/composer.json index 2eab8a8f7b4..84f1e192018 100644 --- a/apps/files_external/3rdparty/composer.json +++ b/apps/files_external/3rdparty/composer.json @@ -9,7 +9,7 @@ }, "require": { "icewind/smb": "2.0.0", - "icewind/streams": "0.5.2" + "icewind/streams": "0.4.1" } } diff --git a/apps/files_external/3rdparty/composer.lock b/apps/files_external/3rdparty/composer.lock index 99ef5f94871..305cc8dc4ba 100644 --- a/apps/files_external/3rdparty/composer.lock +++ b/apps/files_external/3rdparty/composer.lock @@ -4,7 +4,8 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "content-hash": "0bbca3fe2d180fbc5681985bdf6b22e7", + "hash": "a8b4080027a432533f6d0597ad527fe7", + "content-hash": "8165981792437b03b39c11d28b061eda", "packages": [ { "name": "icewind/smb", @@ -45,20 +46,20 @@ } ], "description": "php wrapper for smbclient and libsmbclient-php", - "time": "2016-12-13T13:56:55+00:00" + "time": "2016-12-13 13:56:55" }, { "name": "icewind/streams", - "version": "0.5.2", + "version": "0.4.1", "source": { "type": "git", "url": "https://github.com/icewind1991/Streams.git", - "reference": "6bfd2fdbd99319f5e010d0a684409189a562cb1e" + "reference": "d3620e8dc410c86c2ba55579803679c4e0b289ac" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/icewind1991/Streams/zipball/6bfd2fdbd99319f5e010d0a684409189a562cb1e", - "reference": "6bfd2fdbd99319f5e010d0a684409189a562cb1e", + "url": "https://api.github.com/repos/icewind1991/Streams/zipball/d3620e8dc410c86c2ba55579803679c4e0b289ac", + "reference": "d3620e8dc410c86c2ba55579803679c4e0b289ac", "shasum": "" }, "require": { @@ -86,7 +87,7 @@ } ], "description": "A set of generic stream wrappers", - "time": "2016-12-02T14:21:23+00:00" + "time": "2016-06-02 14:37:52" } ], "packages-dev": [], diff --git a/apps/files_external/3rdparty/composer/ClassLoader.php b/apps/files_external/3rdparty/composer/ClassLoader.php index 4626994fd4d..ac67d302a18 100644 --- a/apps/files_external/3rdparty/composer/ClassLoader.php +++ b/apps/files_external/3rdparty/composer/ClassLoader.php @@ -55,7 +55,6 @@ class ClassLoader private $classMap = array(); private $classMapAuthoritative = false; private $missingClasses = array(); - private $apcuPrefix; public function getPrefixes() { @@ -273,26 +272,6 @@ class ClassLoader } /** - * APCu prefix to use to cache found/not-found classes, if the extension is enabled. - * - * @param string|null $apcuPrefix - */ - public function setApcuPrefix($apcuPrefix) - { - $this->apcuPrefix = function_exists('apcu_fetch') && ini_get('apc.enabled') ? $apcuPrefix : null; - } - - /** - * The APCu prefix in use, or null if APCu caching is not enabled. - * - * @return string|null - */ - public function getApcuPrefix() - { - return $this->apcuPrefix; - } - - /** * Registers this instance as an autoloader. * * @param bool $prepend Whether to prepend the autoloader or not @@ -334,6 +313,11 @@ class ClassLoader */ public function findFile($class) { + // work around for PHP 5.3.0 - 5.3.2 https://bugs.php.net/50731 + if ('\\' == $class[0]) { + $class = substr($class, 1); + } + // class map lookup if (isset($this->classMap[$class])) { return $this->classMap[$class]; @@ -341,12 +325,6 @@ class ClassLoader if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) { return false; } - if (null !== $this->apcuPrefix) { - $file = apcu_fetch($this->apcuPrefix.$class, $hit); - if ($hit) { - return $file; - } - } $file = $this->findFileWithExtension($class, '.php'); @@ -355,10 +333,6 @@ class ClassLoader $file = $this->findFileWithExtension($class, '.hh'); } - if (null !== $this->apcuPrefix) { - apcu_add($this->apcuPrefix.$class, $file); - } - if (false === $file) { // Remember that this class does not exist. $this->missingClasses[$class] = true; diff --git a/apps/files_external/3rdparty/composer/autoload_classmap.php b/apps/files_external/3rdparty/composer/autoload_classmap.php index e6bba3a9a15..ba5d06f7011 100644 --- a/apps/files_external/3rdparty/composer/autoload_classmap.php +++ b/apps/files_external/3rdparty/composer/autoload_classmap.php @@ -7,6 +7,7 @@ $baseDir = $vendorDir; return array( 'Icewind\\SMB\\AbstractShare' => $vendorDir . '/icewind/smb/src/AbstractShare.php', + 'Icewind\\SMB\\Change' => $vendorDir . '/icewind/smb/src/Change.php', 'Icewind\\SMB\\Connection' => $vendorDir . '/icewind/smb/src/Connection.php', 'Icewind\\SMB\\ErrorCodes' => $vendorDir . '/icewind/smb/src/ErrorCodes.php', 'Icewind\\SMB\\Exception\\AccessDeniedException' => $vendorDir . '/icewind/smb/src/Exception/AccessDeniedException.php', @@ -15,6 +16,7 @@ return array( 'Icewind\\SMB\\Exception\\ConnectException' => $vendorDir . '/icewind/smb/src/Exception/ConnectException.php', 'Icewind\\SMB\\Exception\\ConnectionException' => $vendorDir . '/icewind/smb/src/Exception/ConnectionException.php', 'Icewind\\SMB\\Exception\\ConnectionRefusedException' => $vendorDir . '/icewind/smb/src/Exception/ConnectionRefusedException.php', + 'Icewind\\SMB\\Exception\\DependencyException' => $vendorDir . '/icewind/smb/src/Exception/DependencyException.php', 'Icewind\\SMB\\Exception\\Exception' => $vendorDir . '/icewind/smb/src/Exception/Exception.php', 'Icewind\\SMB\\Exception\\FileInUseException' => $vendorDir . '/icewind/smb/src/Exception/FileInUseException.php', 'Icewind\\SMB\\Exception\\ForbiddenException' => $vendorDir . '/icewind/smb/src/Exception/ForbiddenException.php', @@ -31,12 +33,14 @@ return array( 'Icewind\\SMB\\Exception\\TimedOutException' => $vendorDir . '/icewind/smb/src/Exception/TimedOutException.php', 'Icewind\\SMB\\FileInfo' => $vendorDir . '/icewind/smb/src/FileInfo.php', 'Icewind\\SMB\\IFileInfo' => $vendorDir . '/icewind/smb/src/IFileInfo.php', + 'Icewind\\SMB\\INotifyHandler' => $vendorDir . '/icewind/smb/src/INotifyHandler.php', 'Icewind\\SMB\\IShare' => $vendorDir . '/icewind/smb/src/IShare.php', 'Icewind\\SMB\\NativeFileInfo' => $vendorDir . '/icewind/smb/src/NativeFileInfo.php', 'Icewind\\SMB\\NativeServer' => $vendorDir . '/icewind/smb/src/NativeServer.php', 'Icewind\\SMB\\NativeShare' => $vendorDir . '/icewind/smb/src/NativeShare.php', 'Icewind\\SMB\\NativeState' => $vendorDir . '/icewind/smb/src/NativeState.php', 'Icewind\\SMB\\NativeStream' => $vendorDir . '/icewind/smb/src/NativeStream.php', + 'Icewind\\SMB\\NotifyHandler' => $vendorDir . '/icewind/smb/src/NotifyHandler.php', 'Icewind\\SMB\\Parser' => $vendorDir . '/icewind/smb/src/Parser.php', 'Icewind\\SMB\\RawConnection' => $vendorDir . '/icewind/smb/src/RawConnection.php', 'Icewind\\SMB\\Server' => $vendorDir . '/icewind/smb/src/Server.php', @@ -59,23 +63,8 @@ return array( 'Icewind\\Streams\\IteratorDirectory' => $vendorDir . '/icewind/streams/src/IteratorDirectory.php', 'Icewind\\Streams\\NullWrapper' => $vendorDir . '/icewind/streams/src/NullWrapper.php', 'Icewind\\Streams\\Path' => $vendorDir . '/icewind/streams/src/Path.php', - 'Icewind\\Streams\\PathWrapper' => $vendorDir . '/icewind/streams/src/PathWrapper.php', 'Icewind\\Streams\\RetryWrapper' => $vendorDir . '/icewind/streams/src/RetryWrapper.php', 'Icewind\\Streams\\SeekableWrapper' => $vendorDir . '/icewind/streams/src/SeekableWrapper.php', - 'Icewind\\Streams\\Tests\\CallbackWrapper' => $vendorDir . '/icewind/streams/tests/CallbackWrapper.php', - 'Icewind\\Streams\\Tests\\DirectoryFilter' => $vendorDir . '/icewind/streams/tests/DirectoryFilter.php', - 'Icewind\\Streams\\Tests\\DirectoryWrapper' => $vendorDir . '/icewind/streams/tests/DirectoryWrapper.php', - 'Icewind\\Streams\\Tests\\DirectoryWrapperDummy' => $vendorDir . '/icewind/streams/tests/DirectoryWrapper.php', - 'Icewind\\Streams\\Tests\\DirectoryWrapperNull' => $vendorDir . '/icewind/streams/tests/DirectoryWrapper.php', - 'Icewind\\Streams\\Tests\\FailWrapper' => $vendorDir . '/icewind/streams/tests/RetryWrapper.php', - 'Icewind\\Streams\\Tests\\IteratorDirectory' => $vendorDir . '/icewind/streams/tests/IteratorDirectory.php', - 'Icewind\\Streams\\Tests\\NullWrapper' => $vendorDir . '/icewind/streams/tests/NullWrapper.php', - 'Icewind\\Streams\\Tests\\PartialWrapper' => $vendorDir . '/icewind/streams/tests/RetryWrapper.php', - 'Icewind\\Streams\\Tests\\PathWrapper' => $vendorDir . '/icewind/streams/tests/PathWrapper.php', - 'Icewind\\Streams\\Tests\\RetryWrapper' => $vendorDir . '/icewind/streams/tests/RetryWrapper.php', - 'Icewind\\Streams\\Tests\\SeekableWrapper' => $vendorDir . '/icewind/streams/tests/SeekableWrapper.php', - 'Icewind\\Streams\\Tests\\UrlCallBack' => $vendorDir . '/icewind/streams/tests/UrlCallBack.php', - 'Icewind\\Streams\\Tests\\Wrapper' => $vendorDir . '/icewind/streams/tests/Wrapper.php', 'Icewind\\Streams\\Url' => $vendorDir . '/icewind/streams/src/Url.php', 'Icewind\\Streams\\UrlCallback' => $vendorDir . '/icewind/streams/src/UrlCallBack.php', 'Icewind\\Streams\\Wrapper' => $vendorDir . '/icewind/streams/src/Wrapper.php', diff --git a/apps/files_external/3rdparty/composer/autoload_static.php b/apps/files_external/3rdparty/composer/autoload_static.php index 9fa922caeab..10c09bfc409 100644 --- a/apps/files_external/3rdparty/composer/autoload_static.php +++ b/apps/files_external/3rdparty/composer/autoload_static.php @@ -37,6 +37,7 @@ class ComposerStaticInit98fe9b281934250b3a93f69a5ce843b3 public static $classMap = array ( 'Icewind\\SMB\\AbstractShare' => __DIR__ . '/..' . '/icewind/smb/src/AbstractShare.php', + 'Icewind\\SMB\\Change' => __DIR__ . '/..' . '/icewind/smb/src/Change.php', 'Icewind\\SMB\\Connection' => __DIR__ . '/..' . '/icewind/smb/src/Connection.php', 'Icewind\\SMB\\ErrorCodes' => __DIR__ . '/..' . '/icewind/smb/src/ErrorCodes.php', 'Icewind\\SMB\\Exception\\AccessDeniedException' => __DIR__ . '/..' . '/icewind/smb/src/Exception/AccessDeniedException.php', @@ -45,6 +46,7 @@ class ComposerStaticInit98fe9b281934250b3a93f69a5ce843b3 'Icewind\\SMB\\Exception\\ConnectException' => __DIR__ . '/..' . '/icewind/smb/src/Exception/ConnectException.php', 'Icewind\\SMB\\Exception\\ConnectionException' => __DIR__ . '/..' . '/icewind/smb/src/Exception/ConnectionException.php', 'Icewind\\SMB\\Exception\\ConnectionRefusedException' => __DIR__ . '/..' . '/icewind/smb/src/Exception/ConnectionRefusedException.php', + 'Icewind\\SMB\\Exception\\DependencyException' => __DIR__ . '/..' . '/icewind/smb/src/Exception/DependencyException.php', 'Icewind\\SMB\\Exception\\Exception' => __DIR__ . '/..' . '/icewind/smb/src/Exception/Exception.php', 'Icewind\\SMB\\Exception\\FileInUseException' => __DIR__ . '/..' . '/icewind/smb/src/Exception/FileInUseException.php', 'Icewind\\SMB\\Exception\\ForbiddenException' => __DIR__ . '/..' . '/icewind/smb/src/Exception/ForbiddenException.php', @@ -61,12 +63,14 @@ class ComposerStaticInit98fe9b281934250b3a93f69a5ce843b3 'Icewind\\SMB\\Exception\\TimedOutException' => __DIR__ . '/..' . '/icewind/smb/src/Exception/TimedOutException.php', 'Icewind\\SMB\\FileInfo' => __DIR__ . '/..' . '/icewind/smb/src/FileInfo.php', 'Icewind\\SMB\\IFileInfo' => __DIR__ . '/..' . '/icewind/smb/src/IFileInfo.php', + 'Icewind\\SMB\\INotifyHandler' => __DIR__ . '/..' . '/icewind/smb/src/INotifyHandler.php', 'Icewind\\SMB\\IShare' => __DIR__ . '/..' . '/icewind/smb/src/IShare.php', 'Icewind\\SMB\\NativeFileInfo' => __DIR__ . '/..' . '/icewind/smb/src/NativeFileInfo.php', 'Icewind\\SMB\\NativeServer' => __DIR__ . '/..' . '/icewind/smb/src/NativeServer.php', 'Icewind\\SMB\\NativeShare' => __DIR__ . '/..' . '/icewind/smb/src/NativeShare.php', 'Icewind\\SMB\\NativeState' => __DIR__ . '/..' . '/icewind/smb/src/NativeState.php', 'Icewind\\SMB\\NativeStream' => __DIR__ . '/..' . '/icewind/smb/src/NativeStream.php', + 'Icewind\\SMB\\NotifyHandler' => __DIR__ . '/..' . '/icewind/smb/src/NotifyHandler.php', 'Icewind\\SMB\\Parser' => __DIR__ . '/..' . '/icewind/smb/src/Parser.php', 'Icewind\\SMB\\RawConnection' => __DIR__ . '/..' . '/icewind/smb/src/RawConnection.php', 'Icewind\\SMB\\Server' => __DIR__ . '/..' . '/icewind/smb/src/Server.php', @@ -89,23 +93,8 @@ class ComposerStaticInit98fe9b281934250b3a93f69a5ce843b3 'Icewind\\Streams\\IteratorDirectory' => __DIR__ . '/..' . '/icewind/streams/src/IteratorDirectory.php', 'Icewind\\Streams\\NullWrapper' => __DIR__ . '/..' . '/icewind/streams/src/NullWrapper.php', 'Icewind\\Streams\\Path' => __DIR__ . '/..' . '/icewind/streams/src/Path.php', - 'Icewind\\Streams\\PathWrapper' => __DIR__ . '/..' . '/icewind/streams/src/PathWrapper.php', 'Icewind\\Streams\\RetryWrapper' => __DIR__ . '/..' . '/icewind/streams/src/RetryWrapper.php', 'Icewind\\Streams\\SeekableWrapper' => __DIR__ . '/..' . '/icewind/streams/src/SeekableWrapper.php', - 'Icewind\\Streams\\Tests\\CallbackWrapper' => __DIR__ . '/..' . '/icewind/streams/tests/CallbackWrapper.php', - 'Icewind\\Streams\\Tests\\DirectoryFilter' => __DIR__ . '/..' . '/icewind/streams/tests/DirectoryFilter.php', - 'Icewind\\Streams\\Tests\\DirectoryWrapper' => __DIR__ . '/..' . '/icewind/streams/tests/DirectoryWrapper.php', - 'Icewind\\Streams\\Tests\\DirectoryWrapperDummy' => __DIR__ . '/..' . '/icewind/streams/tests/DirectoryWrapper.php', - 'Icewind\\Streams\\Tests\\DirectoryWrapperNull' => __DIR__ . '/..' . '/icewind/streams/tests/DirectoryWrapper.php', - 'Icewind\\Streams\\Tests\\FailWrapper' => __DIR__ . '/..' . '/icewind/streams/tests/RetryWrapper.php', - 'Icewind\\Streams\\Tests\\IteratorDirectory' => __DIR__ . '/..' . '/icewind/streams/tests/IteratorDirectory.php', - 'Icewind\\Streams\\Tests\\NullWrapper' => __DIR__ . '/..' . '/icewind/streams/tests/NullWrapper.php', - 'Icewind\\Streams\\Tests\\PartialWrapper' => __DIR__ . '/..' . '/icewind/streams/tests/RetryWrapper.php', - 'Icewind\\Streams\\Tests\\PathWrapper' => __DIR__ . '/..' . '/icewind/streams/tests/PathWrapper.php', - 'Icewind\\Streams\\Tests\\RetryWrapper' => __DIR__ . '/..' . '/icewind/streams/tests/RetryWrapper.php', - 'Icewind\\Streams\\Tests\\SeekableWrapper' => __DIR__ . '/..' . '/icewind/streams/tests/SeekableWrapper.php', - 'Icewind\\Streams\\Tests\\UrlCallBack' => __DIR__ . '/..' . '/icewind/streams/tests/UrlCallBack.php', - 'Icewind\\Streams\\Tests\\Wrapper' => __DIR__ . '/..' . '/icewind/streams/tests/Wrapper.php', 'Icewind\\Streams\\Url' => __DIR__ . '/..' . '/icewind/streams/src/Url.php', 'Icewind\\Streams\\UrlCallback' => __DIR__ . '/..' . '/icewind/streams/src/UrlCallBack.php', 'Icewind\\Streams\\Wrapper' => __DIR__ . '/..' . '/icewind/streams/src/Wrapper.php', diff --git a/apps/files_external/3rdparty/composer/installed.json b/apps/files_external/3rdparty/composer/installed.json index 8e065858d02..bc71c6d0458 100644 --- a/apps/files_external/3rdparty/composer/installed.json +++ b/apps/files_external/3rdparty/composer/installed.json @@ -1,33 +1,33 @@ [ { - "name": "icewind/smb", - "version": "v2.0.0", - "version_normalized": "2.0.0.0", + "name": "icewind/streams", + "version": "0.4.1", + "version_normalized": "0.4.1.0", "source": { "type": "git", - "url": "https://github.com/icewind1991/SMB.git", - "reference": "95a5ecbaf92617f9800ad7d6070ef31d8ff28c3a" + "url": "https://github.com/icewind1991/Streams.git", + "reference": "d3620e8dc410c86c2ba55579803679c4e0b289ac" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/icewind1991/SMB/zipball/95a5ecbaf92617f9800ad7d6070ef31d8ff28c3a", - "reference": "95a5ecbaf92617f9800ad7d6070ef31d8ff28c3a", + "url": "https://api.github.com/repos/icewind1991/Streams/zipball/d3620e8dc410c86c2ba55579803679c4e0b289ac", + "reference": "d3620e8dc410c86c2ba55579803679c4e0b289ac", "shasum": "" }, "require": { - "icewind/streams": ">=0.2.0", - "php": ">=5.4" + "php": ">=5.3" }, "require-dev": { - "phpunit/phpunit": "^4.8" + "phpunit/phpunit": "^4.8", + "satooshi/php-coveralls": "v1.0.0" }, - "time": "2016-12-13T13:56:55+00:00", + "time": "2016-06-02 14:37:52", "type": "library", - "installation-source": "source", + "installation-source": "dist", "autoload": { "psr-4": { - "Icewind\\SMB\\": "src/", - "Icewind\\SMB\\Test\\": "tests/" + "Icewind\\Streams\\Tests\\": "tests/", + "Icewind\\Streams\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -40,37 +40,37 @@ "email": "icewind@owncloud.com" } ], - "description": "php wrapper for smbclient and libsmbclient-php" + "description": "A set of generic stream wrappers" }, { - "name": "icewind/streams", - "version": "0.5.2", - "version_normalized": "0.5.2.0", + "name": "icewind/smb", + "version": "v2.0.0", + "version_normalized": "2.0.0.0", "source": { "type": "git", - "url": "https://github.com/icewind1991/Streams.git", - "reference": "6bfd2fdbd99319f5e010d0a684409189a562cb1e" + "url": "https://github.com/icewind1991/SMB.git", + "reference": "95a5ecbaf92617f9800ad7d6070ef31d8ff28c3a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/icewind1991/Streams/zipball/6bfd2fdbd99319f5e010d0a684409189a562cb1e", - "reference": "6bfd2fdbd99319f5e010d0a684409189a562cb1e", + "url": "https://api.github.com/repos/icewind1991/SMB/zipball/95a5ecbaf92617f9800ad7d6070ef31d8ff28c3a", + "reference": "95a5ecbaf92617f9800ad7d6070ef31d8ff28c3a", "shasum": "" }, "require": { - "php": ">=5.3" + "icewind/streams": ">=0.2.0", + "php": ">=5.4" }, "require-dev": { - "phpunit/phpunit": "^4.8", - "satooshi/php-coveralls": "v1.0.0" + "phpunit/phpunit": "^4.8" }, - "time": "2016-12-02T14:21:23+00:00", + "time": "2016-12-13 13:56:55", "type": "library", - "installation-source": "dist", + "installation-source": "source", "autoload": { "psr-4": { - "Icewind\\Streams\\Tests\\": "tests/", - "Icewind\\Streams\\": "src/" + "Icewind\\SMB\\": "src/", + "Icewind\\SMB\\Test\\": "tests/" } }, "notification-url": "https://packagist.org/downloads/", @@ -83,6 +83,6 @@ "email": "icewind@owncloud.com" } ], - "description": "A set of generic stream wrappers" + "description": "php wrapper for smbclient and libsmbclient-php" } ] diff --git a/apps/files_external/3rdparty/icewind/streams/src/CallbackWrapper.php b/apps/files_external/3rdparty/icewind/streams/src/CallbackWrapper.php index 4eef55681c7..c5847b95fdb 100644 --- a/apps/files_external/3rdparty/icewind/streams/src/CallbackWrapper.php +++ b/apps/files_external/3rdparty/icewind/streams/src/CallbackWrapper.php @@ -107,8 +107,6 @@ class CallbackWrapper extends Wrapper { $result = parent::stream_close(); if (is_callable($this->closeCallback)) { call_user_func($this->closeCallback); - // prevent further calls by potential PHP 7 GC ghosts - $this->closeCallback = null; } return $result; } 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); } diff --git a/apps/files_external/3rdparty/icewind/streams/src/PathWrapper.php b/apps/files_external/3rdparty/icewind/streams/src/PathWrapper.php deleted file mode 100644 index 88af7e17b33..00000000000 --- a/apps/files_external/3rdparty/icewind/streams/src/PathWrapper.php +++ /dev/null @@ -1,25 +0,0 @@ -<?php -/** - * Copyright (c) 2016 Robin Appelman <icewind@owncloud.com> - * This file is licensed under the Licensed under the MIT license: - * http://opensource.org/licenses/MIT - */ - -namespace Icewind\Streams; - -/** - * A string-like object that maps to an existing stream when opened - */ -class PathWrapper extends NullWrapper { - /** - * @param resource $source - * @return Path|string - */ - public static function getPath($source) { - return new Path(__CLASS__, [ - 'null' => [ - 'source' => $source - ] - ]); - } -} diff --git a/apps/files_external/3rdparty/icewind/streams/src/Wrapper.php b/apps/files_external/3rdparty/icewind/streams/src/Wrapper.php index 8e52eff9a08..53de2942ca9 100644 --- a/apps/files_external/3rdparty/icewind/streams/src/Wrapper.php +++ b/apps/files_external/3rdparty/icewind/streams/src/Wrapper.php @@ -53,7 +53,7 @@ abstract class Wrapper implements File, Directory { if (isset($context[$name])) { $context = $context[$name]; } else { - throw new \BadMethodCallException('Invalid context, "' . $name . '" options not set'); + throw new \BadMethodCallException('Invalid context, "callable" options not set'); } if (isset($context['source']) and is_resource($context['source'])) { $this->setSourceStream($context['source']); |