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

Change subject: Add isset() check before accessing $this->mRefs[$group]
......................................................................


Add isset() check before accessing $this->mRefs[$group]

Follows-up c00cf4a which wrongly assumed the reason for empty()
to be about array count but the real reason was existence.

All other code in Cite extension already uses isset() so this
makes it match the rest.

Bug: T117084
Change-Id: Ic9b0d74ae6ceda5acba187c2fab18c8f5dc9526b
---
M Cite_body.php
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Ori.livneh: Looks good to me, but someone else must approve
  Aaron Schulz: Looks good to me, approved
  Thiemo Mättig (WMDE): Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/Cite_body.php b/Cite_body.php
index 98331d1..9daf921 100644
--- a/Cite_body.php
+++ b/Cite_body.php
@@ -651,7 +651,7 @@
         * @return string XHTML ready for output
         */
        function referencesFormat( $group ) {
-               if ( !$this->mRefs || !$this->mRefs[$group] ) {
+               if ( !$this->mRefs || !isset( $this->mRefs[$group] ) ) {
                        return '';
                }
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic9b0d74ae6ceda5acba187c2fab18c8f5dc9526b
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Cite
Gerrit-Branch: master
Gerrit-Owner: Krinkle <[email protected]>
Gerrit-Reviewer: Aaron Schulz <[email protected]>
Gerrit-Reviewer: Jackmcbarn <[email protected]>
Gerrit-Reviewer: Krinkle <[email protected]>
Gerrit-Reviewer: Ori.livneh <[email protected]>
Gerrit-Reviewer: Thiemo Mättig (WMDE) <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to