I have been getting: 0 - count(): Argument #1 ($value) must be of type Countable|array, bool given

General questions relating to Joomla! 4.x.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting.
Forum Post Assistant - If you are serious about wanting help, you should use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10
Post Reply
carnalim
Joomla! Apprentice
Joomla! Apprentice
Posts: 19
Joined: Fri Apr 03, 2015 2:50 pm

I have been getting: 0 - count(): Argument #1 ($value) must be of type Countable|array, bool given

Post by carnalim » Sun Sep 25, 2022 8:49 pm

When I have the search engine crawl my site I get this weird message:

Code: Select all

0 - count(): Argument #1 ($value) must be of type Countable|array, bool given
When I debug screen:

Code: Select all

Error
in /www/wwwroot/mysite.com/plugins/system/debug/src/DataFormatter.php (line 76)
                $string .= htmlspecialchars($arg) . ', ';            }            $string = rtrim($string, ', ') . ')';        } elseif (isset($call['args'][0])) {            $string .= htmlspecialchars($call['function']) . ' ' . $call['args'][0];        } else {            // It's a function.            $string .= htmlspecialchars($call['function']) . '()';        }
DataFormatter->formatCallerInfo()
in /www/wwwroot/mysite.com/plugins/system/debug/src/AbstractDataCollector.php (line 111)
AbstractDataCollector->formatCallerInfo()
in /www/wwwroot/mysite.com/plugins/system/debug/src/DataCollector/LanguageStringsCollector.php (line 142)
LanguageStringsCollector->getData()
in /www/wwwroot/mysite.com/plugins/system/debug/src/DataCollector/LanguageStringsCollector.php (line 48)
in /www/wwwroot/mysite.com/libraries/vendor/maximebf/debugbar/src/DebugBar/DebugBar.php -> collect (line 238)
in /www/wwwroot/mysite.com/libraries/vendor/maximebf/debugbar/src/DebugBar/DebugBar.php -> collect (line 265)
DebugBar->getData()
in /www/wwwroot/mysite.com/plugins/system/debug/src/JavascriptRenderer.php (line 119)
JavascriptRenderer->render()
in /www/wwwroot/mysite.com/plugins/system/debug/debug.php (line 357)
in /www/wwwroot/mysite.com/libraries/vendor/joomla/event/src/Dispatcher.php -> onAfterRespond (line 486)
Dispatcher->dispatch()
in /www/wwwroot/mysite.com/libraries/src/Application/CMSApplication.php (line 333)
CMSApplication->execute()
in /www/wwwroot/mysite.com/includes/app.php (line 61)
require_once('/www/wwwroot/mysite.com/includes/app.php')
in /www/wwwroot/mysite.com/index.php (line 32)

StackTrace:

Code: Select all

Error:
Object of class Closure could not be converted to string

  at /www/wwwroot/mysite.com/plugins/system/debug/src/DataFormatter.php:76
  at Joomla\Plugin\System\Debug\DataFormatter->formatCallerInfo()
     (/www/wwwroot/mysite.com/plugins/system/debug/src/AbstractDataCollector.php:111)
  at Joomla\Plugin\System\Debug\AbstractDataCollector->formatCallerInfo()
     (/www/wwwroot/mysite.com/plugins/system/debug/src/DataCollector/LanguageStringsCollector.php:142)
  at Joomla\Plugin\System\Debug\DataCollector\LanguageStringsCollector->getData()
     (/www/wwwroot/mysite.com/plugins/system/debug/src/DataCollector/LanguageStringsCollector.php:48)
  at Joomla\Plugin\System\Debug\DataCollector\LanguageStringsCollector->collect()
     (/www/wwwroot/mysite.com/libraries/vendor/maximebf/debugbar/src/DebugBar/DebugBar.php:238)
  at DebugBar\DebugBar->collect()
     (/www/wwwroot/mysite.com/libraries/vendor/maximebf/debugbar/src/DebugBar/DebugBar.php:265)
  at DebugBar\DebugBar->getData()
     (/www/wwwroot/mysite.com/plugins/system/debug/src/JavascriptRenderer.php:119)
  at Joomla\Plugin\System\Debug\JavascriptRenderer->render()
     (/www/wwwroot/mysite.com/plugins/system/debug/debug.php:357)
  at PlgSystemDebug->onAfterRespond()
     (/www/wwwroot/mysite.com/libraries/vendor/joomla/event/src/Dispatcher.php:486)
  at Joomla\Event\Dispatcher->dispatch()
     (/www/wwwroot/mysite.com/libraries/src/Application/CMSApplication.php:333)
  at Joomla\CMS\Application\CMSApplication->execute()
     (/www/wwwroot/mysite.com/includes/app.php:61)
  at require_once('/www/wwwroot/mysite.com/includes/app.php')
     (/www/wwwroot/mysite.com/index.php:32)  

SharkyKZ
Joomla! Hero
Joomla! Hero
Posts: 2446
Joined: Fri Jul 05, 2013 10:35 am
Location: Parts Unknown

Re: I have been getting: 0 - count(): Argument #1 ($value) must be of type Countable|array, bool given

Post by SharkyKZ » Mon Sep 26, 2022 5:29 am

Wait for 4.2.3. In the meantime disable debug in configuration.php.


Post Reply

Return to “General Questions/New to Joomla! 4.x”