[wp-trac] [WordPress Trac] #61352: PHP deprecation warning in /wp-includes/general-template.php

WordPress Trac noreply at wordpress.org
Thu Jun 6 17:47:56 UTC 2024


#61352: PHP deprecation warning in /wp-includes/general-template.php
--------------------------+------------------------------
 Reporter:  nexbridge     |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  General       |     Version:  6.5.3
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+------------------------------

Comment (by michaelreetz):

 Perhaps it would be better to just do the `Null coalescing operator`
 inside the explode.
 {{{#!php
 <?php
 /**
  * Filters the parts of the page title.
  *
  * @since 4.0.0
  *
  * @param string[] $title_array Array of parts of the page title.
  */
 $title_array = apply_filters( 'wp_title_parts', explode( $t_sep, $title ??
 '') );
 }}}
 This feels to me like what the code would have done in previous versions.
 And it would be compatible to php7.0.

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


More information about the wp-trac mailing list