XF 1.5 Error when switching to php 7 or 7.1

dutchbb

Well-known member
Got this error every minute or so when switching from php 5.6 to 7.1

Any idea what it could be?

Code:
TypeError: Argument 1 passed to XenForo_Template_Helper_Core::helperAvatarHtml() must be of the type array, null given, called in /home/bodyforum/public_html/library/XenForo/Template/Helper/Core.php on line 853 - library/XenForo/Template/Helper/Core.php:1718
Gegenereerd Door: Onbekend Account, 6 minuten geleden
Stack Trace
#0 /home/bodyforum/public_html/library/XenForo/Template/Helper/Core.php(853): XenForo_Template_Helper_Core::helperAvatarHtml(NULL, true, Array, '')
#1 /home/bodyforum/public_html/library/XenForo/Template/Abstract.php(265) : eval()'d code(2347): XenForo_Template_Helper_Core::callHelper('avatarhtml', Array)
#2 /home/bodyforum/public_html/library/XenForo/Template/Abstract.php(265): eval()
#3 /home/bodyforum/public_html/library/XenForo/Template/Abstract.php(191): XenForo_Template_Abstract->_renderInternal('$__output = '';...', Array)
#4 /home/bodyforum/public_html/library/XenForo/Template/Public.php(110): XenForo_Template_Abstract->render()
#5 /home/bodyforum/public_html/library/XenForo/ViewRenderer/HtmlPublic.php(124): XenForo_Template_Public->render()
#6 /home/bodyforum/public_html/library/XenForo/FrontController.php(639): XenForo_ViewRenderer_HtmlPublic->renderContainer(Object(XenForo_Template_Public), Array)
#7 /home/bodyforum/public_html/library/XenForo/FrontController.php(158): XenForo_FrontController->renderView(Object(XenForo_ControllerResponse_View), Object(XenForo_ViewRenderer_HtmlPublic), Array)
#8 /home/bodyforum/public_html/index.php(13): XenForo_FrontController->run()
#9 {main}
Aanvraagstatus
array(3) {
  ["url"] => string(127) "https://forum.bodybuilding.nl/fora/powerlifting-strongman-en-gewichtheffen.32/page-198?order=reply_count&direction=asc&page=198"
  ["_GET"] => array(3) {
   ["order"] => string(11) "reply_count"
   ["direction"] => string(3) "asc"
   ["page"] => string(3) "198"
  }
  ["_POST"] => array(0) {
  }
}
 
The thread from the link you posted also shows a different error in the log and is indeed from an add-on.

On my forum everything keeps working and every minute you get the error in the log.
 
Yes it's from a different add-on but it was an add-on that was the issue there. It's likely that an add-on or a template error (possibly caused by an add-on or an edit to a template that you made) is the cause here, as this was suggested in that thread.
 
Opened a ticked an Jon found the problem. It was an ad below the sticky's that was showing a member avatar before it.

At the top of the page, it would seem you have a thread list item being rendered with an avatar icon (Advertentie) but there is no related user information being passed to it, this is what is causing the errors.

It is likely your prior PHP versions error logging was hiding these errors, but with the update they are being output and logged.
 
Back
Top Bottom