[wp-trac] [WordPress Trac] #37746: Replace `absint( $meta_id)` check in `delete_metadata_by_mid`, etc
WordPress Trac
noreply at wordpress.org
Sat Aug 20 07:44:08 UTC 2016
#37746: Replace `absint( $meta_id)` check in `delete_metadata_by_mid`, etc
--------------------------------+------------------------------------------
Reporter: peterwilsoncc | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Options, Meta APIs | Version:
Severity: normal | Keywords: needs-patch needs-unit-tests
Focuses: |
--------------------------------+------------------------------------------
Absint is run on the meta ID when deleting meta data, so calling
`delete_metadata_by_mid( 'user', -10 )` actually results in
`delete_metadata_by_mid( 'user', 10 )`.
This is close but not close enough, instead the function can check it's a
positive integer and fail if not.
Same applies to:
* `update_metadata_by_mid`
* `get_metadata_by_mid`
This will affect the related functions for particular meta types.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/37746>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list