[wp-trac] [WordPress Trac] #61352: PHP deprecation notice in wp_title()

WordPress Trac noreply at wordpress.org
Sat Nov 1 19:54:53 UTC 2025


#61352: PHP deprecation notice in wp_title()
------------------------------+------------------------
 Reporter:  nexbridge         |       Owner:  joedolson
     Type:  defect (bug)      |      Status:  reopened
 Priority:  normal            |   Milestone:  6.9
Component:  Themes            |     Version:  6.5.5
 Severity:  normal            |  Resolution:
 Keywords:  has-patch commit  |     Focuses:
------------------------------+------------------------
Changes (by TobiasBg):

 * status:  closed => reopened
 * resolution:  fixed =>


Comment:

 Using `empty()` in [61108] is not ideal.
 `$title` is a string, so this can instead be simplified to a string
 comparison `'' !== $title`, saving internal variable type checks.
 (For the case where it's not a string `explode()` would otherwise also
 throw a warning or error.)
 In addition, this could lead to the valid title `"0"` (a string with a
 zero) to be treated in the wrong way.

 See [60726] for a similar change.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/61352#comment:31>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list