From: Aaron Schulz Date: Fri, 4 Dec 2015 23:31:02 +0000 (-0800) Subject: Fix some FileRepo IDEA errors X-Git-Tag: 1.31.0-rc.0~8796 X-Git-Url: http://git.cyclocoop.org/%22%2C%20generer_url_ecrire%28?a=commitdiff_plain;h=55ba12d6c41e4f580365914ecdc21e7de0dc55a0;p=lhc%2Fweb%2Fwiklou.git Fix some FileRepo IDEA errors Change-Id: Ia30d82c9ce27503182d95cd9a3f23d80743e7364 --- diff --git a/includes/filerepo/FileRepo.php b/includes/filerepo/FileRepo.php index 647dbece19..15007af556 100644 --- a/includes/filerepo/FileRepo.php +++ b/includes/filerepo/FileRepo.php @@ -123,13 +123,13 @@ class FileRepo { /** @var bool Whether all zones should be private (e.g. private wiki repo) */ protected $isPrivate; - /** - * Factory functions for creating new files - * Override these in the base class - */ + /** @var array callable Override these in the base class */ protected $fileFactory = array( 'UnregisteredLocalFile', 'newFromTitle' ); + /** @var array callable|bool Override these in the base class */ protected $oldFileFactory = false; + /** @var array callable|bool Override these in the base class */ protected $fileFactoryKey = false; + /** @var array callable|bool Override these in the base class */ protected $oldFileFactoryKey = false; /** @@ -1031,8 +1031,10 @@ class FileRepo { $headers = array( 'Content-Disposition' => $triple[2] ); } elseif ( is_array( $triple[2] ) && isset( $triple[2]['headers'] ) ) { $headers = $triple[2]['headers']; + } else { + $headers = array(); } - // @fixme: $headers might not be defined + $operations[] = array( 'op' => FileBackend::isStoragePath( $src ) ? 'copy' : 'store', 'src' => $src,