Dereckson has submitted this change and it was merged.

Change subject: Avoid function call in a for loop
......................................................................


Avoid function call in a for loop

Change-Id: I971d0842bb47b799db9da82fb0f0e6123c7f0b67
---
M Git2Pages.body.php
1 file changed, 4 insertions(+), 4 deletions(-)

Approvals:
  Paladox: Looks good to me, but someone else must approve
  Dereckson: Looks good to me, approved



diff --git a/Git2Pages.body.php b/Git2Pages.body.php
index 8887e4b..1dc986f 100644
--- a/Git2Pages.body.php
+++ b/Git2Pages.body.php
@@ -58,10 +58,10 @@
         */
        public static function PullContentFromRepo( $parser ) {
                global $wgGit2PagesDataDir;
-               $opts = array();
-               for ( $i = 1; $i < func_num_args(); $i++ ) {
-                       $opts[] = func_get_arg( $i );
-               }
+
+               $opts = func_get_args();
+               array_shift( $opts );
+
                $options = self::extractOptions( $opts );
                $url = $options['repository'];
                if ( isset( $options['branch'] ) ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I971d0842bb47b799db9da82fb0f0e6123c7f0b67
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Git2Pages
Gerrit-Branch: master
Gerrit-Owner: Dereckson <[email protected]>
Gerrit-Reviewer: Dereckson <[email protected]>
Gerrit-Reviewer: Galorefitz <[email protected]>
Gerrit-Reviewer: Hashar <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: Paladox <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to