Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Problems with serializing Zend\Stdlib\ArrayObject #6089

Closed
koenpunt opened this Issue · 7 comments

2 participants

@koenpunt

The simple example below fails with:

Warning: in_array() expects parameter 2 to be array, null given in Zend/Stdlib/ArrayObject.php on line 100
$ar = new Zend\Stdlib\ArrayObject();
$ar->foo = 'bar';
$ar['bar'] = 'foo';

$serialized = serialize($ar);
$unserialized = unserialize($serialized);

I tried to fix it in #6088, but without success..

@Ocramius Ocramius referenced this issue from a commit in Ocramius/zf2
@Ocramius Ocramius Hotfix for #6089 - `protectedProperties` of ArrayObject are maintaine…
…d on serialization
da29799
@Ocramius Ocramius added this to the 2.3.1 milestone
@Ocramius Ocramius self-assigned this
@Ocramius
Collaborator

@koenpunt can you check #6089?

@Ocramius
Collaborator

Close, please poke me if the issue persists, @koenpunt

@Ocramius Ocramius closed this
@koenpunt

Still (or again) having issues with this, using the same example as mentioned before...

@Ocramius
Collaborator

@koenpunt there's a test case for this one - could you adapt it to the failure that you are experiencing?

@koenpunt

Oh, I'm not using the latest version because zend-paginator keeps the composer version back to 2.3.0...

@Ocramius
Collaborator

Ah yes, see #6397

@koenpunt

Resolved it for now by specifying as follows:

{
 "zendframework/zend-stdlib": "2.3.1 as 2.3.0",
 "zendframework/zend-paginator": "2.3.*",
}
@gianarb gianarb referenced this issue from a commit in zendframework/zend-stdlib
@Ocramius Ocramius Adding failing test case for zendframework/zf2#6089 - serialization c…
…auses notices
ce5b132
@gianarb gianarb referenced this issue from a commit in zendframework/zend-stdlib
@Ocramius Ocramius Hotfix for zendframework/zf2#6089 - `protectedProperties` of ArrayObj…
…ect are maintained on serialization
6cf691d
@weierophinney weierophinney referenced this issue from a commit in zendframework/zend-stdlib
@weierophinney weierophinney Merge pull request zendframework/zf2#6092 from Ocramius/hotfix/zendfr…
…amework/zf2#6089-arrayobject-serialization

Hotfix for zendframework/zf2#6089 - ArrayObject serialization doesn't restore `protectedProperties`
60d73cb
@weierophinney weierophinney referenced this issue from a commit in zendframework/zend-stdlib
@weierophinney weierophinney Merge branch 'hotfix/6092' 4ac816f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.