Make WordPress Core

#62691 closed defect (bug) (duplicate)

convert_smilies has an Uncaught TypeError

Reported by: roybellingan Owned by:
Priority: normal Milestone:
Component: Formatting Version: 6.7.1
Severity: normal Keywords:
Cc: Focuses:

Description

Latest wordpress still has this bug
https://wordpress.stackexchange.com/a/409087

I would suggest to use something like

<?php
                if(! ($value instanceof Countable)){
                        $stop = 0;
                }else{
                        $stop    = count( $textarr ); // Loop stuff.
                }

Change History (2)

#1 @roybellingan
21 months ago

Sorry forget to say this is in wp-includes/formatting.php around line 3840

#2 @SergeyBiryukov
21 months ago

  • Component GeneralFormatting
  • Milestone Awaiting Review
  • Resolutionduplicate
  • Status newclosed

Hi there, welcome to WordPress Trac!

Thanks for the report, we're already tracking this issue in #51019.

Note: See TracTickets for help on using tickets.