1. 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

Discussion in 'Resolved Bug Reports' started by Rjs37, May 2, 2011.

  1. Rjs37

    Rjs37 Member

    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.
  2. Jeremy P

    Jeremy P Well-Known Member

  3. Rjs37

    Rjs37 Member

    Apologies. When a mod sees this then please close the thread lol.

Share This Page