diff options
| author | Felipe Pena <felipensp@gmail.com> | 2013-06-25 21:18:34 -0300 |
|---|---|---|
| committer | Felipe Pena <felipensp@gmail.com> | 2013-06-25 21:18:34 -0300 |
| commit | f5bf90ef34eca98f299c2eb2f608fcdbbba5428e (patch) | |
| tree | d3a9831a08e4fe79bbddb23b2fdd77a38bb7b10b /ext/spl/tests | |
| parent | b78f129a4a76037d8106300ce946de9971172a51 (diff) | |
| parent | 04db57066deb73ef9c960a2c5bebad49195bc1bb (diff) | |
| download | php-git-f5bf90ef34eca98f299c2eb2f608fcdbbba5428e.tar.gz | |
Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
- Fixed bug #62672 (Error on serialize of ArrayObject) patch by: lior dot k at zend dot com
- BFN
Diffstat (limited to 'ext/spl/tests')
| -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 0000000000..d0d6a62451 --- /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) |
