Fix TempFSFile creation
authorBryan Davis <bd808@wikimedia.org>
Fri, 13 Dec 2013 19:49:45 +0000 (12:49 -0700)
committerBryan Davis <bd808@wikimedia.org>
Fri, 13 Dec 2013 19:49:45 +0000 (12:49 -0700)
A new TempFSFile should be instantiated via the factory rather than
using the object constructor.

Change-Id: Icd059566087c6a644a0d0ed69abfe13b88b38ee4

includes/upload/UploadFromUrl.php

index 6d956e2..19b4dfd 100644 (file)
@@ -211,7 +211,7 @@ class UploadFromUrl extends UploadBase {
         * @return string Path to the file
         */
        protected function makeTemporaryFile() {
-               $tmpFile = new TempFSFile( 'URL' );
+               $tmpFile = TempFSFile::factory( 'URL' );
                $tmpFile->bind( $this );
                return $tmpFile->getPath();
        }