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

Duplicate  undefined constant user_id - avatarHtml function

#1
Code:
Notice (8): Use of undefined constant user_id - assumed 'user_id' [forumpath\library\XenForo\Template\Helper\Core.php, line 1458]
It's only a notice rather than an error but I'm making use of the avatarHtml function from the XenForo_Template_Helper_Core class and I'm receiving that message (using it in an external file of mine). I fixed it on my local version just by adding ' around user_id on the line it mentioned.

I assume that either you guys have notices suppressed notices or coincidentally have a constant defined with that name. Looking at the code I believe it should be loading it from the $user array anyway.