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
This commit is contained in:
Bryan Davis 2015-01-08 17:05:13 -07:00
parent e21c7852c6
commit db56e255d4

View file

@ -393,7 +393,7 @@ class Cite {
// 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'] ) ) {
break;
}
}