Make WordPress Core

Opened 2 months ago

Closed 2 months ago

#60473 closed enhancement (fixed)

Coding Standards: Use `implode` instead of `join` in wp-includes/fonts/class-wp-font-utils.php

Reported by: davidbinda's profile david.binda Owned by: hellofromtonya's profile hellofromTonya
Milestone: 6.5 Priority: normal
Severity: normal Version: 6.5
Component: Editor Keywords: has-patch commit
Focuses: coding-standards Cc:

Description

r49193 replaced multiple instances of aliased functions by the canonical ones.

r57539 contains an instance of join, which, IMHO, should be replaced for implode (per r49193).

Attachments (1)

60473.diff (439 bytes) - added by david.binda 2 months ago.

Download all attachments as: .zip

Change History (3)

@david.binda
2 months ago

#1 @hellofromTonya
2 months ago

  • Component changed from General to Editor
  • Keywords has-patch commit added
  • Milestone changed from Awaiting Review to 6.5
  • Owner set to hellofromTonya
  • Status changed from new to reviewing

Good catch @davidbinda. Yes, I agree with you. Marking this for commit and will prep the commit shortly.

Here's the PR in Gutenberg with the same change to keep the code in sync https://github.com/WordPress/gutenberg/pull/58845.

#2 @hellofromTonya
2 months ago

  • Resolution set to fixed
  • Status changed from reviewing to closed

In 57567:

Coding Standards: Replace alias join() in WP_Font_Utils.

Replaces the alias join() with its canonical implode().

Using the canonical function name for PHP functions is strongly recommended, as aliases may be deprecated or removed without (much) warning.

Follow-up to [57539], [49193].

Props davidbinda.
Fixes #60473.

Note: See TracTickets for help on using tickets.