diff options
author | Robin Appelman <robin@icewind.nl> | 2021-04-19 17:00:47 +0300 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2021-04-19 17:00:47 +0300 |
commit | eeb72c33389c5091a790e964c21b5caf718a5135 (patch) | |
tree | 3bf6634b0595ffeb4298ada100f7f1dff508f60c /apps/files_external/3rdparty/icewind/smb/src/Native/NativeStream.php | |
parent | 9a69b8839389f133db55a41e1c2ba4435fd50c19 (diff) |
update icewind/smb to 3.4.1
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'apps/files_external/3rdparty/icewind/smb/src/Native/NativeStream.php')
-rw-r--r-- | apps/files_external/3rdparty/icewind/smb/src/Native/NativeStream.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/apps/files_external/3rdparty/icewind/smb/src/Native/NativeStream.php b/apps/files_external/3rdparty/icewind/smb/src/Native/NativeStream.php index 216c27f78e3..624ef829d74 100644 --- a/apps/files_external/3rdparty/icewind/smb/src/Native/NativeStream.php +++ b/apps/files_external/3rdparty/icewind/smb/src/Native/NativeStream.php @@ -52,7 +52,9 @@ abstract class NativeStream implements File { * @return resource */ protected static function wrapClass(NativeState $state, $smbStream, string $mode, string $url, string $class) { - stream_wrapper_register('nativesmb', $class); + if (stream_wrapper_register('nativesmb', $class) === false) { + throw new Exception("Failed to register stream wrapper"); + } $context = stream_context_create([ 'nativesmb' => [ 'state' => $state, @@ -61,7 +63,9 @@ abstract class NativeStream implements File { ] ]); $fh = fopen('nativesmb://', $mode, false, $context); - stream_wrapper_unregister('nativesmb'); + if (stream_wrapper_unregister('nativesmb') === false) { + throw new Exception("Failed to unregister stream wrapper"); + } return $fh; } |