Make WordPress Core

Opened 3 years ago

Closed 3 years ago

#58436 closed defect (bug) (fixed)

Emoji: Extraneous sprintf() present in _print_emoji_detection_script()

Reported by: westonruter Owned by: westonruter
Priority: low Milestone: 6.3
Component: Emoji Version: 5.9
Severity: trivial Keywords: has-patch
Cc: Focuses:

Description

In r52132 for #44632 I erroneously included a sprintf() without any arguments:

// 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:

// 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.

Change History (5)

This ticket was mentioned in ​PR #4529 on ​WordPress/wordpress-develop by ​@westonruter.


3 years ago
#1

  • Keywords has-patch added

#2 @westonruter
3 years ago

  • Owner set to westonruter
  • Resolution → fixed
  • Status new → closed

In 55875:

Emoji: Remove extraneous sprintf() from _print_emoji_detection_script().

The sprintf() is not being passed any values, and there is no placeholder to replace.
This originated in r52132 in which I erroneously included this sprintf() in
two places. I fixed one of the cases in r52151 but I missed the other.

Follow-up to [52132], [52151].

Fixes #58436.
See #44632.

#3 @westonruter
3 years ago

  • Keywords fixed-major added
  • Resolution fixed
  • Status closed → reopened

Reopening for 6.2.3 consideration.

​@westonruter commented on ​PR #4529:


3 years ago
#4

Committed to trunk in r55875.

#5 @SergeyBiryukov
3 years ago

  • Keywords fixed-major removed
  • Milestone 6.2.3 → 6.3
  • Resolution → fixed
  • Status reopened → closed

Closing as fixed in 6.3, as there are no plans for 6.2.3 at this time.

Note: See TracTickets for help on using tickets.