Incorrect visitor log links after upgrade to 1.8.4

I’m not sure why my previous thread/post with this same title was deleted from the forum… but anyway I came back to share the fix for the bug for 1.8.4. It turns out there was something weird going on with a foreach and a value reference. After reassigning the reference, all of my visitor log links were addressed properly.

The fix simply consists of inserting the following on line 207 of plugins/Live/API.php (right after the open brace for the foreach):

$actionDetail =& $actionDetails[$actionIdx];

I suspect there may be other similar issues where a foreach is used with a referenced value, but I have yet to run into anything as visible as this one was.

I’m running on PHP 5.1.6 FWIW.

Thanks for the message & patch. It is really surprising indeed, does this fix the problems of Outlinks not displayed correctly in Visitor Log ?

Thank you mscdex. Your fix is great.
The visitor log is correct now, all links are fine.

[quote=matt]
Thanks for the message & patch. It is really surprising indeed, does this fix the problems of Outlinks not displayed correctly in Visitor Log ?[/quote]

I do not know if it fixes anything else. The only problem I was having was the one where only the first link for each visit had the URI prefix properly prepended.

Thanks, I created a ticket: Incorrect visitor log links on 5.1.6 · Issue #3403 · matomo-org/matomo · GitHub