aboutsummaryrefslogtreecommitdiffstats
path: root/includes/filebackend/FileBackendStore.php
diff options
context:
space:
mode:
authorAaron Schulz <aschulz@wikimedia.org>2013-05-10 13:45:34 -0700
committerAaron Schulz <aschulz@wikimedia.org>2013-05-10 13:45:34 -0700
commit6b1194b9dadeff80b51d6af7c56c97244a92a058 (patch)
tree254e187b3ac6775b9e569ca17f46e04f90480343 /includes/filebackend/FileBackendStore.php
parente281c6f699ef154a7c4d6f0ae0ebf1cead7ca3e3 (diff)
downloadmediawikicore-6b1194b9dadeff80b51d6af7c56c97244a92a058.tar.gz
mediawikicore-6b1194b9dadeff80b51d6af7c56c97244a92a058.zip
[FileBackend] Optimize the case were no operations are provided.
Change-Id: Iaf858ce2e8b21e031d27b984029f0424518201af
Diffstat (limited to 'includes/filebackend/FileBackendStore.php')
-rw-r--r--includes/filebackend/FileBackendStore.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/includes/filebackend/FileBackendStore.php b/includes/filebackend/FileBackendStore.php
index e20c6fcc5cda..c620dd3be896 100644
--- a/includes/filebackend/FileBackendStore.php
+++ b/includes/filebackend/FileBackendStore.php
@@ -1134,6 +1134,10 @@ abstract class FileBackendStore extends FileBackend {
wfProfileIn( __METHOD__ . '-' . $this->name );
$status = Status::newGood();
+ if ( !count( $ops ) ) {
+ return $status; // nothing to do
+ }
+
// Fix up custom header name/value pairs...
$ops = array_map( array( $this, 'stripInvalidHeadersFromOp' ), $ops );
@@ -1186,6 +1190,10 @@ abstract class FileBackendStore extends FileBackend {
wfProfileIn( __METHOD__ . '-' . $this->name );
$status = Status::newGood();
+ if ( !count( $ops ) ) {
+ return $status; // nothing to do
+ }
+
// Fix up custom header name/value pairs...
$ops = array_map( array( $this, 'stripInvalidHeadersFromOp' ), $ops );