From c12ca466f39e94aab61fe0f649d7838e9d468114 Mon Sep 17 00:00:00 2001 From: Timo Tijhof Date: Thu, 29 Oct 2015 21:27:05 +0000 Subject: [PATCH] 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 --- Cite_body.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cite_body.php b/Cite_body.php index 98331d122..9daf9217f 100644 --- a/Cite_body.php +++ b/Cite_body.php @@ -651,7 +651,7 @@ class Cite { * @return string XHTML ready for output */ function referencesFormat( $group ) { - if ( !$this->mRefs || !$this->mRefs[$group] ) { + if ( !$this->mRefs || !isset( $this->mRefs[$group] ) ) { return ''; }