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

xfrocks

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

PHP:
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

Code:
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

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

Or this will do

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

Thank you
 
I'm actually quite confused as to why that hasn't come up before - the code should always be hit. Regardless, fixed. :)
 
Top Bottom