From: Aaron Schulz Date: Fri, 10 May 2013 20:45:34 +0000 (-0700) Subject: [FileBackend] Optimize the case were no operations are provided. X-Git-Tag: 1.31.0-rc.0~19711 X-Git-Url: http://git.cyclocoop.org/data/Luca_Pacioli_%28Gemaelde%29.jpeg?a=commitdiff_plain;h=6b1194b9dadeff80b51d6af7c56c97244a92a058;p=lhc%2Fweb%2Fwiklou.git [FileBackend] Optimize the case were no operations are provided. Change-Id: Iaf858ce2e8b21e031d27b984029f0424518201af --- diff --git a/includes/filebackend/FileBackendStore.php b/includes/filebackend/FileBackendStore.php index e20c6fcc5c..c620dd3be8 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 );