[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
Wed Apr 24 15:49:19 UTC 2024
#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: php81 changes-requested needs-unit- | Focuses: php-
tests needs-patch | compatibility
-------------------------------------------------+-------------------------
Changes (by antpb):
* keywords: has-patch needs-testing php81 changes-requested => php81
changes-requested needs-unit-tests needs-patch
Comment:
Thanks for the report! This ticket was discussed in the recent Media
component meeting and we think there are two options to be explored:
1) We omit null values from `get_available_post_mime_types()`
2) It is typically recommended to use a blank string instead of null in
these cases so maybe we can just set the value of a no-mime to `''` which
should act the same as null previously
--
Ticket URL: <https://core.trac.wordpress.org/ticket/59195#comment:11>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list