[support] can't clean $user->data in DB
Ivan Sergio Borgonovo
mail at webthatworks.it
Fri Nov 30 23:10:37 UTC 2007
On Fri, 30 Nov 2007 17:44:32 -0500
Earnie Boyd <earnie at users.sourceforge.net> wrote:
> Quoting Ivan Sergio Borgonovo <mail at webthatworks.it>:
> > I cleared them in the update/insert hook_user
> > $edit['field']=NULL;
> > but I still get b:0; in the data field of the DB.
> Uhm, b:0; is the value of a serialized NULL.
serialized false (php 5.2.X, 4.3.X)
ivan at dark:~$ php -a
Interactive mode enabled
<?php
print(serialize(null));
N;
print(serialize(false));
b:0;
furthermore the user_save does an unset($value[$key]); this value get
into an array that get imploded and passed to db_query that in turns
passes it to db_escape_string and then I'm lost.
but well still
ivan at dark:~$ php -a
Interactive mode enabled
<?php
$tonno['morto']=null;
unset($tonno['morto']);
print(serialize($tonno));
a:0:{}
I can't understand where that unset value become a bool.
Or... I just missed something in my code.
--
Ivan Sergio Borgonovo
http://www.webthatworks.it
More information about the support
mailing list