Aaron Schulz has submitted this change and it was merged.

Change subject: [FileBackend] Optimize the case were no operations are provided.
......................................................................


[FileBackend] Optimize the case were no operations are provided.

Change-Id: Iaf858ce2e8b21e031d27b984029f0424518201af
---
M includes/filebackend/FileBackendStore.php
1 file changed, 8 insertions(+), 0 deletions(-)

Approvals:
  Demon: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/filebackend/FileBackendStore.php 
b/includes/filebackend/FileBackendStore.php
index e20c6fc..c620dd3 100644
--- a/includes/filebackend/FileBackendStore.php
+++ b/includes/filebackend/FileBackendStore.php
@@ -1134,6 +1134,10 @@
                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 @@
                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 );
 

-- 
To view, visit https://gerrit.wikimedia.org/r/63221
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Iaf858ce2e8b21e031d27b984029f0424518201af
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz <[email protected]>
Gerrit-Reviewer: Aaron Schulz <[email protected]>
Gerrit-Reviewer: Demon <[email protected]>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to