Make WordPress Core

Opened 11 months ago

Closed 9 months ago

#58436 closed defect (bug) (fixed)

Emoji: Extraneous sprintf() present in _print_emoji_detection_script()

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

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.


11 months ago
#1

  • Keywords has-patch added

#2 @westonruter
11 months ago

  • Owner set to westonruter
  • Resolution set to fixed
  • Status changed from new to 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
11 months ago

  • Keywords fixed-major added
  • Resolution fixed deleted
  • Status changed from closed to reopened

Reopening for 6.2.3 consideration.

@westonruter commented on PR #4529:


11 months ago
#4

Committed to trunk in r55875.

#5 @SergeyBiryukov
9 months ago

  • Keywords fixed-major removed
  • Milestone changed from 6.2.3 to 6.3
  • Resolution set to fixed
  • Status changed from reopened to 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.