[FileBackend] Optimize the case were no operations are provided.
[lhc/web/wiklou.git] / includes / filebackend / FileBackendStore.php
index e20c6fc..c620dd3 100644 (file)
@@ -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 );