Closed rich20 closed 10 months ago
https://www.kunena.org/forum/k-6-2-0-support/168229-0-count-argument-1-$value-must-be-of-type-countable-array,-int-given Confirmed
To Reproduce Change something in the Klatest settings
Result Error: 0 count(): Argument #1 ($value) must be of type Countable|array, int given
Additional context Even if you reset the setting, the error remains.
<div>
1 | () | JROOT/components/com_kunena/src/Model/TopicsModel.php:618 2 | count() | JROOT/components/com_kunena/src/Model/TopicsModel.php:618 3 | Kunena\Forum\Site\Model\TopicsModel->populateState() | JROOT/libraries/src/MVC/Model/StateBehaviorTrait.php:59 4 | Joomla\CMS\MVC\Model\BaseModel->getState() | JROOT/libraries/src/MVC/View/AbstractView.php:152 5 | Joomla\CMS\MVC\View\AbstractView->get() | JROOT/libraries/kunena/src/View/KunenaView.php:268 6 | Kunena\Forum\Libraries\View\KunenaView->displayLayout() | JROOT/libraries/kunena/src/Forum/KunenaForum.php:526 7 | Kunena\Forum\Libraries\Forum\KunenaForum::display() | JROOT/modules/mod_kunenalatest/src/ModuleKunenaLatest.php:108 8 | Kunena\Module\KunenaLatest\Site\ModuleKunenaLatest->_display() | JROOT/libraries/kunena/src/Module/KunenaModule.php:113 9 | Kunena\Forum\Libraries\Module\KunenaModule->display() | JROOT/modules/mod_kunenalatest/mod_kunenalatest.php:38 10 | include() | JROOT/libraries/src/Dispatcher/ModuleDispatcher.php:52 11 | Joomla\CMS\Dispatcher\ModuleDispatcher::Joomla\CMS\Dispatcher{closure}() | JROOT/libraries/src/Dispatcher/ModuleDispatcher.php:55 12 | Joomla\CMS\Dispatcher\ModuleDispatcher->dispatch() | JROOT/libraries/src/Helper/ModuleHelper.php:281 13 | Joomla\CMS\Helper\ModuleHelper::renderRawModule() | JROOT/libraries/src/Helper/ModuleHelper.php:161 14 | Joomla\CMS\Helper\ModuleHelper::renderModule() | JROOT/libraries/src/Document/Renderer/Html/ModuleRenderer.php:99 15 | Joomla\CMS\Document\Renderer\Html\ModuleRenderer->render() | JROOT/libraries/src/Document/HtmlDocument.php:671 16 | Joomla\CMS\Document\HtmlDocument->countModules() | JROOT/templates/cassiopeia/index.php:100 17 | require() | JROOT/libraries/src/Document/HtmlDocument.php:721 18 | Joomla\CMS\Document\HtmlDocument->_loadTemplate() | JROOT/libraries/src/Document/HtmlDocument.php:776 19 | Joomla\CMS\Document\HtmlDocument->_fetchTemplate() | JROOT/libraries/src/Document/HtmlDocument.php:612 20 | Joomla\CMS\Document\HtmlDocument->parse() | JROOT/libraries/src/Application/CMSApplication.php:1012 21 | Joomla\CMS\Application\CMSApplication->render() | JROOT/libraries/src/Application/SiteApplication.php:724 22 | Joomla\CMS\Application\SiteApplication->render() | JROOT/libraries/src/Application/CMSApplication.php:298 23 | Joomla\CMS\Application\CMSApplication->execute() | JROOT/includes/app.php:61 24 | require_once() | JROOT/index.php:32
System information
Desktop
I'am not able to reproduce this issue
Found the cause. When K-Latest is reinstalled, nothing is marked in the selection.
If you select something and save, the error is gone.
You can test it:
Fixed by : https://github.com/Kunena/Kunena-Forum/commits/K6.2/
https://www.kunena.org/forum/k-6-2-0-support/168229-0-count-argument-1-$value-must-be-of-type-countable-array,-int-given Confirmed
To Reproduce Change something in the Klatest settings
Result Error: 0 count(): Argument #1 ($value) must be of type Countable|array, int given
Additional context Even if you reset the setting, the error remains.
Call stack
| Function | Location
1 | () | JROOT/components/com_kunena/src/Model/TopicsModel.php:618 2 | count() | JROOT/components/com_kunena/src/Model/TopicsModel.php:618 3 | Kunena\Forum\Site\Model\TopicsModel->populateState() | JROOT/libraries/src/MVC/Model/StateBehaviorTrait.php:59 4 | Joomla\CMS\MVC\Model\BaseModel->getState() | JROOT/libraries/src/MVC/View/AbstractView.php:152 5 | Joomla\CMS\MVC\View\AbstractView->get() | JROOT/libraries/kunena/src/View/KunenaView.php:268 6 | Kunena\Forum\Libraries\View\KunenaView->displayLayout() | JROOT/libraries/kunena/src/Forum/KunenaForum.php:526 7 | Kunena\Forum\Libraries\Forum\KunenaForum::display() | JROOT/modules/mod_kunenalatest/src/ModuleKunenaLatest.php:108 8 | Kunena\Module\KunenaLatest\Site\ModuleKunenaLatest->_display() | JROOT/libraries/kunena/src/Module/KunenaModule.php:113 9 | Kunena\Forum\Libraries\Module\KunenaModule->display() | JROOT/modules/mod_kunenalatest/mod_kunenalatest.php:38 10 | include() | JROOT/libraries/src/Dispatcher/ModuleDispatcher.php:52 11 | Joomla\CMS\Dispatcher\ModuleDispatcher::Joomla\CMS\Dispatcher{closure}() | JROOT/libraries/src/Dispatcher/ModuleDispatcher.php:55 12 | Joomla\CMS\Dispatcher\ModuleDispatcher->dispatch() | JROOT/libraries/src/Helper/ModuleHelper.php:281 13 | Joomla\CMS\Helper\ModuleHelper::renderRawModule() | JROOT/libraries/src/Helper/ModuleHelper.php:161 14 | Joomla\CMS\Helper\ModuleHelper::renderModule() | JROOT/libraries/src/Document/Renderer/Html/ModuleRenderer.php:99 15 | Joomla\CMS\Document\Renderer\Html\ModuleRenderer->render() | JROOT/libraries/src/Document/HtmlDocument.php:671 16 | Joomla\CMS\Document\HtmlDocument->countModules() | JROOT/templates/cassiopeia/index.php:100 17 | require() | JROOT/libraries/src/Document/HtmlDocument.php:721 18 | Joomla\CMS\Document\HtmlDocument->_loadTemplate() | JROOT/libraries/src/Document/HtmlDocument.php:776 19 | Joomla\CMS\Document\HtmlDocument->_fetchTemplate() | JROOT/libraries/src/Document/HtmlDocument.php:612 20 | Joomla\CMS\Document\HtmlDocument->parse() | JROOT/libraries/src/Application/CMSApplication.php:1012 21 | Joomla\CMS\Application\CMSApplication->render() | JROOT/libraries/src/Application/SiteApplication.php:724 22 | Joomla\CMS\Application\SiteApplication->render() | JROOT/libraries/src/Application/CMSApplication.php:298 23 | Joomla\CMS\Application\CMSApplication->execute() | JROOT/includes/app.php:61 24 | require_once() | JROOT/index.php:32
System information
Desktop