jenkins-bot has submitted this change and it was merged.

Change subject: Preserve array keys in array_slice
......................................................................


Preserve array keys in array_slice

Enabled could show as disabled when keys were renumbered.

Change-Id: I56dd242c10dc2df11e1c2d2462fc539914ce7e47
---
M SpecialUserOptionStats.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/SpecialUserOptionStats.php b/SpecialUserOptionStats.php
index c6fe292..ad592ff 100644
--- a/SpecialUserOptionStats.php
+++ b/SpecialUserOptionStats.php
@@ -80,7 +80,7 @@
                // So use the last free color for "other" which includes the 
rest
                $max = 7;
                $rest = array_slice( $data, $max );
-               $data = array_slice( $data, 0, $max );
+               $data = array_slice( $data, 0, $max, true );
                foreach ( $data as $k => $d ) {
                        $labels[] = "$k ($d)";
                        $realdata[] = array( $k, $d );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I56dd242c10dc2df11e1c2d2462fc539914ce7e47
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UserOptionStats
Gerrit-Branch: master
Gerrit-Owner: Nikerabbit <[email protected]>
Gerrit-Reviewer: Santhosh <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to