• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Fixed  Super minor issue (and easy to fix, please read)


Well-known member
This one is really small but it bugged me quite a lot.

XenForo 1.0.1 (actually, all version)
Class: XenForo_Template_Helper_Core
Line: 1458

return "<a{$href} class=\"avatar Av{$user[user_id]}{$size}{$class}\"{$attribs} data-avatarHtml=\"true\">{$image}{$content}</a>";
Sometime, this line will cause an exception like this

An exception occurred: Use of undefined constant user_id - assumed 'user_id' in ...\library\XenForo\Template\Helper\Core.php on line 1458
It doesn't happen all the time but please fix, either this

return "<a{$href} class=\"avatar Av{$user['user_id']}{$size}{$class}\"{$attribs} data-avatarHtml=\"true\">{$image}{$content}</a>";
Or this will do

return "<a{$href} class=\"avatar Av$user[user_id]{$size}{$class}\"{$attribs} data-avatarHtml=\"true\">{$image}{$content}</a>";
Thank you


XenForo developer
Staff member
I'm actually quite confused as to why that hasn't come up before - the code should always be hit. Regardless, fixed. :)