Server issue Template error: count(): Parameter must be an array or an object that implements Countable

Nirjonadda

Well-known member
Affected version
2.0.1
Server error log.

Code:
ErrorException: Template error: count(): Parameter must be an array or an object that implements Countable src/XF/Entity/User.php:557

Generated by: RashaBaba Dec 22, 2017 at 12:59 AM

Stack trace

#0 [internal function]: XF\Template\Templater->handleTemplateError(2, 'count(): Parame...', '/home/nadda/pub...', 557, Array)
#1 src/XF/Entity/User.php(557): count(false)
#2 [internal function]: XF\Entity\User->canChangeLanguage()
#3 src/XF/Template/Templater.php(920): call_user_func_array(Array, Array)
#4 internal_data/code_cache/templates/l0/s21/public/PAGE_CONTAINER.php(1144): XF\Template\Templater->method(Object(Snog\StyleStats\XF\Entity\User), 'canChangeLangua...', Array)
#5 src/XF/Template/Templater.php(1230): XF\Template\Templater->{closure}(Object(ThemeHouse\Reactions\XF\Template\Templater), Array)
#6 src/XF/Pub/App.php(449): XF\Template\Templater->renderTemplate('PAGE_CONTAINER', Array)
#7 src/XF/App.php(1715): XF\Pub\App->renderPageHtml('\n\n\n\n\n\n\n\n\n\t\n\t\n\t\n...', Array, Object(XF\Mvc\Reply\View), Object(XF\Mvc\Renderer\Html))
#8 src/XF/Mvc/Dispatcher.php(310): XF\App->renderPage('\n\n\n\n\n\n\n\n\n\t\n\t\n\t\n...', Object(XF\Mvc\Reply\View), Object(XF\Mvc\Renderer\Html))
#9 src/XF/Mvc/Dispatcher.php(44): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html')
#10 src/XF/App.php(1880): XF\Mvc\Dispatcher->run()
#11 src/XF.php(328): XF\App->run()
#12 index.php(13): XF::runApp('XF\\Pub\\App')
#13 {main}

Request state

array(4) {
  ["url"] => string(72) "/threads/dressed.196180/"
  ["referrer"] => string(93) "/forums/picture.42/?last_days=7&order=post_date&direction=desc"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}
 
Back
Top Bottom