BryanDavis has uploaded a new change for review.
https://gerrit.wikimedia.org/r/183742
Change subject: Guard against unset array access
......................................................................
Guard against unset array access
From prod error logs:
Undefined index: 0 in Cite_body.php on line 396
Undefined index: 1 in Cite_body.php on line 396
Undefined index: 2 in Cite_body.php on line 396
Undefined index: 3 in Cite_body.php on line 396
Undefined index: follow in Cite_body.php on line 396
Change-Id: Id727f2fd7e72d8c4ceb74fdac42885d5c030b4af
---
M Cite_body.php
1 file changed, 3 insertions(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Cite
refs/changes/42/183742/1
diff --git a/Cite_body.php b/Cite_body.php
index 8cb406f..951e221 100644
--- a/Cite_body.php
+++ b/Cite_body.php
@@ -393,7 +393,9 @@
// insert part of note at the beginning of the
group
$groupsCount = count( $this->mRefs[$group] );
for ( $k = 0; $k < $groupsCount; $k++ ) {
- if ( $this->mRefs[$group][$k]['follow']
== null ) {
+ if ( isset(
$this->mRefs[$group][$k]['follow'] ) &&
+
$this->mRefs[$group][$k]['follow'] == null
+ ) {
break;
}
}
--
To view, visit https://gerrit.wikimedia.org/r/183742
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Id727f2fd7e72d8c4ceb74fdac42885d5c030b4af
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Cite
Gerrit-Branch: master
Gerrit-Owner: BryanDavis <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits