I have a 4 year old framework that serializes objects and stores them
in the database. It is now going PHP 5-only, so I began to add
visibility to the class definitions of the serialized objects.
However, then things didn't work properly after objects stored [before
the visibility was added] were unserialized. For example, each
protected field ended up creating two fields, with one followed by
":protected".
Expected Result:
----------------------
object(Foo) {
["bar"]=>
string(0) "banana"
}
Actual Result:
----------------------
object(Foo) {
["bar:protected"]=>
string(0) ""
["bar"]=>
string(6) "banana"
}
Anybody run into this, or can explain why this might be and how I can
avoid it?
Thanks,
~Ted
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php