[wp-hackers] 0 as meta-data value is not being added to the database.

Otto otto at ottodestruct.com
Mon Dec 12 21:40:38 UTC 2011


I can't see any reason it wouldn't add it.

Are you checking the database directly for the result? Or are you
checking with get_metadata and then comparing to false?

Reason I ask is because 0 == false, but 0 does not === false.

-Otto



On Mon, Dec 12, 2011 at 2:14 PM, Kevinjohn Gallagher
<kevinjohngallagher at hotmail.com> wrote:
> One of many tonight (sorry folks),
>
> For the life of me I can’t figure this one out, when I try to add or update meta-data where the value is “0” (zero), it’s neither adds or updates it.
> If I change the value to anything other than “0” or “ “ it works fine.
> We surely don’t think that “0” is the same as no data, do we?
>
> Any idea’s?
>
> Thanks very much,
> Kev
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers


More information about the wp-hackers mailing list