[wp-hackers] Negative number / symbol in user meta

Alex Rayan alexrayan69 at gmail.com
Fri May 3 21:19:04 UTC 2013


Hi Chris,
Are you storing latitude and longitude as a separate individual user meta
key / value pairs or as a serialized array?

I usually use json_encode on a php array to store multiple values in user
or post meta and did not have issues with negative values in this case.
Regardless, negative sign shouldn't be stripped out. Perhaps, it happens in
the the processing code rather than in the core?

Regards,
Alex


On Fri, May 3, 2013 at 4:54 PM, Chris Carter <chris at 314media.com> wrote:

> I'm creating a user map and storing long and lat for users as user meta ..
>
>
> when i use get_user_meta, my negative number comes back stripped of the -
> symbol.
>
> Can anyone confirm this or have a suggestion?
>
>> 314media.com
> _______________________________________________
> 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