Opened 6 months ago

#22746 new defect (bug)

The metadata_exists() function should return the correct value if the get_$meta_type_metadata filter returns a non null value

Reported by: xknown Owned by:
Priority: normal Milestone: Awaiting Review
Component: General Version:
Severity: normal Keywords:
Cc:

Description

The line 324 should return $check instead of true, otherwise the filter doesn't normally work when someone wants to always return false for a given meta key.

Here's a quick way to reproduce it

> add_filter('get_user_metadata', '__return_false'); return metadata_exists('user', 1, 1)
TRUE

Attachments (1)

meta.diff (421 bytes) - added by xknown 6 months ago.
Return $check instead of true.

Download all attachments as: .zip

Change History (1)

xknown6 months ago

Return $check instead of true.

Note: See TracTickets for help on using tickets.