[wp-trac] [WordPress Trac] #58436: Emoji: Extraneous sprintf() present in _print_emoji_detection_script()

WordPress Trac noreply at wordpress.org
Wed May 31 23:25:12 UTC 2023


#58436: Emoji: Extraneous sprintf() present in _print_emoji_detection_script()
--------------------------+--------------------
 Reporter:  westonruter   |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  low           |  Milestone:  6.2.3
Component:  Emoji         |    Version:  5.9
 Severity:  trivial       |   Keywords:
  Focuses:                |
--------------------------+--------------------
 In r52132 for #44632 I erroneously included a `sprintf()` without any
 arguments:

 {{{#!php
 // src/wp-includes/embed.php
 $output = wp_get_inline_script_tag(
     file_get_contents( sprintf( ABSPATH . WPINC . '/js/wp-embed' .
 wp_scripts_get_suffix() . '.js' ) )
 );
 }}}

 And:

 {{{#!php
 // src/wp-includes/formatting.php
 wp_print_inline_script_tag(
     sprintf( 'window._wpemojiSettings = %s;', wp_json_encode( $settings )
 ) .
         file_get_contents( sprintf( ABSPATH . WPINC . '/js/wp-emoji-
 loader' . wp_scripts_get_suffix() . '.js' ) )
 );
 }}}

 I fixed the former case in r52151 but I missed the latter.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/58436>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list