[Phpmyadmin-devel] unserialize in user preferences

Piotr Przybylski piotr.prz at gmail.com
Wed Feb 16 17:25:26 CET 2011


W dniu 16 lutego 2011 17:07 użytkownik Herman van Rink
<rink at initfour.nl> napisał:
> On 09-02-11 20:18, Michal Čihař wrote:
>> Hi
>>
>> Dne Wed, 9 Feb 2011 19:25:47 +0100
>> Piotr Przybylski <piotr.prz at gmail.com> napsal(a):
>>
>>> I think we can safely change user preferences to use
>>> json_encode/decode. It's a simpler and faster solution.
>> I think as well, that's why I've opened this topic.
>
> Using that should not pose a problem for user preferences.
>
> As it's introduced in 3.4 the only problem would be preferences saved by
> a 3.4 beta version.
> Losing these would not be a huge issue, as long as log as pma does not
> feakout over 'corrupted' preference data.
>

When json_decode() fails it does it silently and returns a null, we
can check for it and return an empty array.

-- 
Piotr Przybylski




More information about the Developers mailing list