Commit 8a7c06f2 authored by Joe Hoyle's avatar Joe Hoyle
Browse files

Don't check if the stream is already registered

parent 24fb938f
Loading
Loading
Loading
Loading
+1 −6
Original line number Diff line number Diff line
@@ -7,12 +7,7 @@ class S3_Uploads_Stream_Wrapper extends Aws\S3\StreamWrapper {
	 *
	 * @param S3Client $client Client to use with the stream wrapper
	 */
	public static function register( Aws\S3\S3Client $client)
	{
		if ( in_array('s3', stream_get_wrappers() ) ) {
			stream_wrapper_unregister('s3');
		}

	public static function register( Aws\S3\S3Client $client) {
		stream_wrapper_register( 's3', __CLASS__, STREAM_IS_URL );
		static::$client = $client;
	}