Daniel Werner has submitted this change and it was merged.

Change subject: Fix undefined offset when loading special page
......................................................................


Fix undefined offset when loading special page

This was caught by the tests I have added
in the follow up commit
Change-Id: I85271ade7711f1138b1f25777e1a7f99855d0e2a
---
M repo/includes/specials/SpecialEntitiesWithoutLabel.php
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Daniel Werner: Verified; Looks good to me, approved



diff --git a/repo/includes/specials/SpecialEntitiesWithoutLabel.php 
b/repo/includes/specials/SpecialEntitiesWithoutLabel.php
index 0750970..ab104ee 100644
--- a/repo/includes/specials/SpecialEntitiesWithoutLabel.php
+++ b/repo/includes/specials/SpecialEntitiesWithoutLabel.php
@@ -67,7 +67,7 @@
                $this->type = null;
                if ( $subPage !== null ) {
                        $parts = explode( '/', $subPage );
-                       if ( count( $parts >= 2 ) ) {
+                       if ( array_key_exists( 1, $parts ) ) {
                                $this->type = $parts[1];
                        }
                        $this->language = $parts[0];

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I85271ade7711f1138b1f25777e1a7f99855d0e2a
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Addshore <[email protected]>
Gerrit-Reviewer: Aude <[email protected]>
Gerrit-Reviewer: Daniel Kinzler <[email protected]>
Gerrit-Reviewer: Daniel Werner <[email protected]>
Gerrit-Reviewer: Denny Vrandecic <[email protected]>
Gerrit-Reviewer: Henning Snater <[email protected]>
Gerrit-Reviewer: Hoo man <[email protected]>
Gerrit-Reviewer: Jeroen De Dauw <[email protected]>
Gerrit-Reviewer: jenkins-bot

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

Reply via email to