Hi!
Have PHP 4.3.7, magic_quotes_gpc = On
Have a multidimensional array made from values from a POST form.
It addslashes() every field of the form as expected, like (') => (\'),
etc.
When I searialize the array to put it into a mysql db it seems to fail
to describe the string lenght of values with the (') character, like
this:
$arr['PestName']="a'cqua", it results the following in the serialized
string stored in the db:
a:1:{i:1;a:5:{s:8:"PestName";s:7:"a'cqua"....
note that "a'cqua" is not 7 chars lenght, but 6.
The problem is when I try to recover the array with unserialize(), it
fails, returning false. It is obvious that php is counting the (\)
character when serializing the string, but it stores it without it in
the db, so when it tries to recover the array, it fails.
Is this a known bug? Are there any workarounds you know?

Thanks a lot in advance.

Hernan

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to