diff options
author | Ondřej Surý <ondrej@sury.org> | 2013-10-27 20:38:12 +0100 |
---|---|---|
committer | Ondřej Surý <ondrej@sury.org> | 2013-10-27 20:38:12 +0100 |
commit | 749e5ad39dbac3f4f62be438367f8cdf90056815 (patch) | |
tree | ad0677df3bf44a6761380686e400ffd878585288 /ext/spl/tests/bug62672.phpt | |
parent | 4ed39205864f58ba7c368e4ae1362d8214469fd9 (diff) | |
download | php-749e5ad39dbac3f4f62be438367f8cdf90056815.tar.gz |
New upstream version 5.4.21upstream/5.4.21
Diffstat (limited to 'ext/spl/tests/bug62672.phpt')
-rw-r--r-- | ext/spl/tests/bug62672.phpt | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/ext/spl/tests/bug62672.phpt b/ext/spl/tests/bug62672.phpt new file mode 100644 index 000000000..d0d6a6245 --- /dev/null +++ b/ext/spl/tests/bug62672.phpt @@ -0,0 +1,31 @@ +--TEST-- +Bug #62672 (Error on serialize of ArrayObject) +--FILE-- +<?php + +class ObjA +{ + private $_varA; + + public function __construct(Iterator $source) + { + $this->_varA = $source; + } +} + +class ObjB extends ObjA +{ + private $_varB; + + public function __construct(ArrayObject $keys) + { + $this->_varB = $keys; + parent::__construct($keys->getIterator()); + } +} + +$obj = new ObjB(new ArrayObject()); + +var_dump($obj == unserialize(serialize($obj))); +--EXPECTF-- +bool(true) |