Use "rb" instead of "rb+" for Swift store operation handles
authorAaron Schulz <aschulz@wikimedia.org>
Mon, 3 Feb 2014 20:31:07 +0000 (12:31 -0800)
committerTim Starling <tstarling@wikimedia.org>
Mon, 3 Feb 2014 23:17:19 +0000 (23:17 +0000)
bug: 60318
Change-Id: I411b2505287d4e4addff3231f9374775353b347b

includes/filebackend/SwiftFileBackend.php

index d6bbfbe..f3b9664 100644 (file)
@@ -275,7 +275,7 @@ class SwiftFileBackend extends FileBackendStore {
                $sha1Hash = wfBaseConvert( $sha1Hash, 16, 36, 31 );
                $contentType = $this->getContentType( $params['dst'], null, $params['src'] );
 
-               $handle = fopen( $params['src'], 'rb+' );
+               $handle = fopen( $params['src'], 'rb' );
                if ( $handle === false ) { // source doesn't exist?
                        $status->fatal( 'backend-fail-store', $params['src'], $params['dst'] );