[wp-trac] [WordPress Trac] #64085: Missing parentheses in condition in delete_metadata()
WordPress Trac
noreply at wordpress.org
Tue Oct 7 09:16:04 UTC 2025
#64085: Missing parentheses in condition in delete_metadata()
--------------------------------+-----------------------------
Reporter: threadi | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Options, Meta APIs | Version: 6.8.3
Severity: normal | Keywords:
Focuses: |
--------------------------------+-----------------------------
In {{{ wp-includes/meta.php }}} inside the function delete_metadata() if
the following if-condition:
{{{
if ( ! $meta_type || ! $meta_key || ! is_numeric( $object_id ) && !
$delete_all ) {
return false;
}
}}}
There is a missing parentheses around the last two conditions on this
line. As a result, the condition will not be true in the cases where it
should be.
A correction would look like this:
{{{
if ( ! $meta_type || ! $meta_key || ( ! is_numeric( $object_id ) && !
$delete_all ) ) {
return false;
}
}}}
Source: https://github.com/WordPress/WordPress/blob/master/wp-
includes/meta.php#L402
--
Ticket URL: <https://core.trac.wordpress.org/ticket/64085>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list