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

XF 1.5 XenForo_Template_Public::__toString() must not throw an exception

Discussion in 'Troubleshooting and Problems' started by BamaStangGuy, Apr 13, 2016.

  1. BamaStangGuy

    BamaStangGuy Well-Known Member

    Code:
    Error Info
    ErrorException: Fatal Error: Method XenForo_Template_Public::__toString() must not throw an exception, caught TypeError: Argument 1 passed to XenForo_Template_Helper_Core::helperAvatarHtml() must be of the type array, null given, called in /home/nginx/domains/christianforums.com/public/library/XenForo/Template/Helper/Core.php on line 853 - internal_data/templates/S.6,L.1,find_new_wrapper.php:0
    Generated By: OGM, 17 minutes ago
    Stack Trace
    #0 [internal function]: XenForo_Application::handleFatalError()
    #1 {main}
    Request State
    array(3) {
      ["url"] => string(61) "http://www.christianforums.com/find-new/3929214/posts?page=21"
      ["_GET"] => array(2) {
        ["/find-new/3929214/posts"] => string(0) ""
        ["page"] => string(2) "21"
      }
      ["_POST"] => array(0) {
      }
    }
    Just started getting a few of these every 15-20 minutes... any ideas?
     
  2. Mike

    Mike XenForo Developer Staff Member

    Annoyingly, PHP errors like this are difficult to debug. The implication is that this is coming from the find_new_wrapper template, which doesn't have any avatar elements out of the box. Have you customized this?

    Alternatively, it could be within find_new_posts (or an included template). It (unfortunately) would be something that we'd need to test with the default style and no add-ons as I don't think this is something we've seen before.
     
    Xon likes this.
  3. Pinn

    Pinn Active Member

    We can this fix? I have the same problem...
     
  4. Mike

    Mike XenForo Developer Staff Member

    What is the specific error message?
     
  5. Pinn

    Pinn Active Member

    PHP:
    ErrorExceptionFatal ErrorMethod XenForo_Template_Public::__toString() must not throw an exceptioncaught TypeErrorArgument 1 passed to XenForo_Template_Helper_Core::helperAvatarHtml() must be of the type array, boolean givencalled in /www///-/library/XenForo/Template/Helper/Core.php on line 853
    Bug Site in Admin 975....
     
  6. Mike

    Mike XenForo Developer Staff Member

    The URL that triggered it would help, but it's likely to be a bad template customization. The URL would allow me to at least give you an idea of where to look, but you'd likely need to start editing relevant templates to track down the specific call that's causing problems.
     

Share This Page