Fatal Error in convert_smilies in formatting.php – Issue with Non-Countable Valu
-
Hello,
I am experiencing a fatal error on my WordPress website that seems to originate from the
formatting.php
file, specifically within theconvert_smilies
function on line 3480. The error occurs when a non-countable value (boolean) is passed to thecount()
function, causing the following error:
Fatal error: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, bool given in /wp-includes/formatting.php:3480Details of the Issue:
- The error occurs when filtering content via
apply_filters('the_content', ...)
. - It appears that some non-countable data is being passed to
count()
inconvert_smilies
. - The full stack trace points to interactions with the
convert_smilies
function during the rendering of content on single post templates.
My Setup:
- WordPress Version: [Provide your WordPress version]
- PHP Version: [Provide your PHP version]
- Active Theme: Impreza
- Active Plugins: Includes
us-core
and other standard plugins
Steps I Have Taken:
- Added debugging to identify the problematic value, which turned out to be a
boolean
instead ofarray
. - Attempted to resolve the issue by wrapping the
count()
call in anis_countable()
check, but this change is overwritten during updates. - Verified that the error originates in
formatting.php
and occurs due to content passed via filters.
My Request: - Could you provide a solution to ensure that the
convert_smilies
function safely handles non-countable values? Alternatively, is there an update or patch planned to address this issue in WordPress core? - I would appreciate your guidance on resolving this issue or preventing it in the future without modifying WordPress core files. If more details are needed, I can provide additional logs or server configurations.
Thank you for your support.
Best regards,xcull
The page I need help with: [log in to see the link]
- The error occurs when filtering content via
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- You must be logged in to reply to this topic.