From: Aaron Schulz Date: Wed, 15 Jan 2014 21:05:01 +0000 (-0800) Subject: Fixed wrong usage of $tmpFile in Swift backend X-Git-Tag: 1.31.0-rc.0~17246^2 X-Git-Url: http://git.cyclocoop.org/%22.%28%24lien.?a=commitdiff_plain;h=f46cd2a593195953e9bd30694bd58486b0910bbe;p=lhc%2Fweb%2Fwiklou.git Fixed wrong usage of $tmpFile in Swift backend Change-Id: I21293be38c53b4dca3030c26a201f70d8ed243f3 --- diff --git a/includes/filebackend/SwiftFileBackend.php b/includes/filebackend/SwiftFileBackend.php index 9ed6a4581f..17b9b4d866 100644 --- a/includes/filebackend/SwiftFileBackend.php +++ b/includes/filebackend/SwiftFileBackend.php @@ -1101,7 +1101,7 @@ class SwiftFileBackend extends FileBackendStore { fclose( $op['stream'] ); // close open handle if ( $rcode >= 200 && $rcode <= 299 // double check that the disk is not full/broken - && $tmpFile->getSize() == $rhdrs['content-length'] + && $tmpFiles[$path]->getSize() == $rhdrs['content-length'] ) { // good } elseif ( $rcode === 404 ) { diff --git a/tests/phpunit/includes/filebackend/FileBackendTest.php b/tests/phpunit/includes/filebackend/FileBackendTest.php index 1dbc74ca1b..cee2da2f4f 100644 --- a/tests/phpunit/includes/filebackend/FileBackendTest.php +++ b/tests/phpunit/includes/filebackend/FileBackendTest.php @@ -1324,7 +1324,7 @@ class FileBackendTest extends MediaWikiTestCase { $cases[] = array( array( "$base/unittest-cont1/e/a/x.txt", "$base/unittest-cont1/e/a/y.txt", "$base/unittest-cont1/e/a/z.txt" ), - array( "contents xx", "contents xy", "contents xz" ) + array( "contents xx $", "contents xy 111", "contents xz" ) ); return $cases; @@ -1391,7 +1391,7 @@ class FileBackendTest extends MediaWikiTestCase { $cases[] = array( array( "$base/unittest-cont1/e/a/x.txt", "$base/unittest-cont1/e/a/y.txt", "$base/unittest-cont1/e/a/z.txt" ), - array( "contents xx", "contents xy", "contents xz" ) + array( "contents xx 1111", "contents xy %", "contents xz $" ) ); return $cases;