• xcull09

    (@xcull09)


    Hello,

    I am experiencing a fatal error on my WordPress website that seems to originate from the formatting.php file, specifically within the convert_smilies function on line 3480. The error occurs when a non-countable value (boolean) is passed to the count() 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:3480

    Details 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() in convert_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:

    1. Added debugging to identify the problematic value, which turned out to be a boolean instead of array.
    2. Attempted to resolve the issue by wrapping the count() call in an is_countable() check, but this change is overwritten during updates.
    3. Verified that the error originates in formatting.php and occurs due to content passed via filters.


      My Request:
    4. 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?
    5. 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]

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.