[wp-trac] [WordPress Trac] #18210: Update_post_meta is case insensitive on meta_key, but get_post_meta is NOT
WordPress Trac
wp-trac at lists.automattic.com
Fri Jul 22 09:25:28 UTC 2011
#18210: Update_post_meta is case insensitive on meta_key, but get_post_meta is NOT
--------------------------+------------------------------
Reporter: anmari | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: 3.2.1
Severity: normal | Resolution:
Keywords: |
--------------------------+------------------------------
Comment (by xknown):
Yes, it is due to the collation used by default in WP (utf8_general_ci),
which is case insensitive. There are more cases than case insensivity, for
example the following query returns true:
{{{
select ('_allday' COLLATE utf8_general_ci) = ('_âlldây ' COLLATE
utf8_general_ci)
}}}
The reason why get_post_meta does not work for you is because the meta
data are first cached in PHP using an array with key/value pairs and as
you know, the string comparison in PHP is case sensitive.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/18210#comment:3>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list