links is flat array

Pass a valid key to makeLink rather than an integer (index)
which may result in an exception.

Bug: T286040
Change-Id: Ic69ec102caec982e65e264f5812ac15df5168008
This commit is contained in:
jdlrobson 2021-07-13 08:32:28 -07:00 committed by Jdlrobson
parent 660180290c
commit 120ecc6d1b

View file

@ -2481,8 +2481,9 @@ abstract class Skin extends ContextSource {
if ( isset( $item['links'] ) ) {
$links = [];
foreach ( $item['links'] as $linkKey => $link ) {
$links[] = $this->makeLink( $linkKey, $link, $options );
foreach ( $item['links'] as $link ) {
// Note: links will have identical label unless 'msg' is set on $link
$links[] = $this->makeLink( $key, $link, $options );
}
$html = implode( ' ', $links );
} else {