Re: ArrayObject - no prop access after deserialization
- From: Jerry Stuckle <jstucklex@xxxxxxxxxxxxx>
- Date: Fri, 09 Jan 2009 20:47:26 -0500
Thomas Mlynarczyk wrote:
Hello,
This code
$o = new ArrayObject(
array( 'foo' => 1, 'bar' => 2 ),
ArrayObject::ARRAY_AS_PROPS );
var_dump( $o['foo'] );
var_dump( $o->foo );
$o = unserialize( serialize( $o ) );
var_dump( $o['foo'] );
var_dump( $o->foo );
outputs
int(1)
int(1)
int(1)
NULL
(tested with PHP 5.2.4 on Windows). I had expected another int(1) instead of NULL. It seems that the ARRAY_AS_PROPS flag does not "survive" the serialization. What am I doing wrong?
Greetings,
Thomas
Hi, Thomas.
Hmmm, this looks like a bug. Not surprising since much of this code is fairly new (and probably not heavily used yet).
I'd recommend you submit a bug report on it. It will go well with the other recent reported bugs on ArrayObject.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@xxxxxxxxxxxxx
==================
.
- Follow-Ups:
- Re: ArrayObject - no prop access after deserialization
- From: Thomas Mlynarczyk
- Re: ArrayObject - no prop access after deserialization
- References:
- ArrayObject - no prop access after deserialization
- From: Thomas Mlynarczyk
- ArrayObject - no prop access after deserialization
- Prev by Date: Re: Access violation PHP 5.2.8 on IIS
- Next by Date: Re: Access violation PHP 5.2.8 on IIS
- Previous by thread: Re: ArrayObject - no prop access after deserialization
- Next by thread: Re: ArrayObject - no prop access after deserialization
- Index(es):
Relevant Pages
|
Loading