From 0638b7cfec8c6e3a9436cd3b899c19d49491df17 Mon Sep 17 00:00:00 2001 From: Marcus Boerger Date: Thu, 25 May 2006 18:15:04 +0000 Subject: [PATCH] - Make recursive part and identical part work correct --- ext/spl/examples/recursivedualiterator.inc | 2 +- ext/spl/examples/tests/dualiterator_001.phpt | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ext/spl/examples/recursivedualiterator.inc b/ext/spl/examples/recursivedualiterator.inc index 7b5f85b9f9..702e0cd745 100755 --- a/ext/spl/examples/recursivedualiterator.inc +++ b/ext/spl/examples/recursivedualiterator.inc @@ -47,7 +47,7 @@ class RecursiveDualIterator extends DualIterator implements RecursiveIterator $this->ref = new ReflectionClass($this); } return $this->ref->newInstance( - $this->getLHS()->current(), $this->getRHS()->current(), $this->flags); + $this->getLHS()->getChildren(), $this->getRHS()->getChildren(), $this->getFlags()); } /** @return whether both inner iterators are valid, have same hasChildren() diff --git a/ext/spl/examples/tests/dualiterator_001.phpt b/ext/spl/examples/tests/dualiterator_001.phpt index e69a39b00c..5577c4dc18 100755 --- a/ext/spl/examples/tests/dualiterator_001.phpt +++ b/ext/spl/examples/tests/dualiterator_001.phpt @@ -26,6 +26,10 @@ test(array(1,array(21,22),3), array(1,array(21,22),3)); test(array(1,array(21,22),3), array(1,array(21,22,23),3)); test(array(1,array(21,22),3), array(1,array(21,22,3))); test(array(1,array(21,22),3), array(1,array(21),array(22),3)); +test(array(1,2,3), array(1,"2",3), false); +test(array(1,2,3), array(1,"2",3), true); +test(array(1,array(21,22),3), array(1,array(21,"22"),3), false); +test(array(1,array(21,22),3), array(1,array(21,"22"),3), true); ?> ===DONE=== @@ -36,4 +40,8 @@ bool(true) bool(false) bool(false) bool(false) +bool(true) +bool(false) +bool(true) +bool(false) ===DONE=== -- 2.40.0