[wp-trac] Re: [WordPress Trac] #9065: Can not store 0 (zero) in meta_value using update_usermeta() in user.php

WordPress Trac wp-trac at lists.automattic.com
Sat Feb 7 23:12:24 GMT 2009


#9065: Can not store 0 (zero) in meta_value using update_usermeta() in user.php
--------------------------+-------------------------------------------------
 Reporter:  stevejohnson  |        Owner:  anonymous
     Type:  defect (bug)  |       Status:  new      
 Priority:  lowest        |    Milestone:  2.8      
Component:  General       |      Version:  2.7      
 Severity:  trivial       |   Resolution:           
 Keywords:                |  
--------------------------+-------------------------------------------------
Comment (by DD32):

 Another thing: Everything is stored as a string (except arrays and
 objects), So passing (int)1 in, would result in (string)1 out, (bool)true
 results in (string)1 coming out.

 I've found (This was with options, but the same holds for meta's) that
 wraping everything in an array is best array( (int)1 ); results in array(
 (int)1 ); coming out.

-- 
Ticket URL: <http://trac.wordpress.org/ticket/9065#comment:2>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list