next() should not return the value, ever. This is not an issue.

Iteration works like thus:

next() - moves pointer one place forward (doesn't care if it's valid or not)
valid() - checks pointer is in a valid place (here's where we check that, returns boolean)
current() - returns current value

So the next() method below is doing more than it should - it should only advance the pointer.

- Davey


On Sep 28, 2006, at 5:49 AM, Ahmed Shreef wrote:


On 9/28/06, Irina Khmelinina <[EMAIL PROTECTED]> wrote:
I think, this will be simpler ;)

in Zend/Config.php:

    public function next()
    {
        if (next($this->_data) === false && *key($this->_data) === null*) {
            $this->_iterationPointerValid = false;
        } else {
            $this->_iterationPointerValid = true;
        }
    }

Should I report it to the issue tracker?

Regards,
Irina Khmelinina


Okay, you win ;-) . and don't forget to report it please.

Best Regards
--
Ahmed Shreef
Web Developer
Egypt

Reply via email to