[wp-trac] [WordPress Trac] #59195: deprecation notice triggered in post.php by passing null to parameter #2 in preg_match()

WordPress Trac noreply at wordpress.org
Fri Aug 25 03:40:59 UTC 2023


#59195: deprecation notice triggered in post.php by passing null to parameter #2 in
preg_match()
-------------------------------------+--------------------------------
 Reporter:  nosilver4u               |       Owner:  (none)
     Type:  defect (bug)             |      Status:  new
 Priority:  normal                   |   Milestone:  Awaiting Review
Component:  Media                    |     Version:  6.3
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch needs-testing  |     Focuses:  php-compatibility
-------------------------------------+--------------------------------

Comment (by jrf):

 @nosilver4u Thanks for opening this ticket.

 The only way this deprecation should be able to show is if the input data
 passed to the `wp_match_mime_types()` function is invalid, i.e. either
 `null` was passed to `$real_mime_types` or `$real_mime_types` is an array
 with one or more `null` values, while the function expects a string or an
 array of strings.

 In other words, this should **not** be fixed in this function. This needs
 a backtrace to see where the incorrect data is coming from and should be
 fixed at the source of the incorrect data.

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


More information about the wp-trac mailing list