The code at line 73 needs to be changed from
$links[$key]['weight'] = 0;
to
$links[$link]['weight'] = 0;

as $key is not an initialized variable here.

Regards,
Lukas

Comments

delykj’s picture

Here is the correct fix:
change:
foreach ($links as $link) {
$links[$key]['weight'] = 0;
}

to:

foreach (array_keys($links) as $key) {
$links[$key]['weight'] = 0;
}