ZF-3408: Zend_Config does not decrease $_count when node is unset()

Issue Type: Bug Created: 2008-06-07T10:20:46.000+0000 Last Updated: 2008-09-02T10:39:12.000+0000 Status: Resolved Fix version(s): - 1.6.0 (02/Sep/08)

Reporter: Ben Scholzen (dasprid) Assignee: Rob Allen (rob) Tags: - Zend_Config

Related issues: Attachments:


The count() method, defined by the Countable interface, uses $this->_count, which is set in the constructor of Zend_Config. The problem now is, when you unset a value (done via the magic method __unset()), $this->_count is not decreased by one. So when you count() the Zend_Config object after you unset a node, you get the wrong number.


Posted by Rob Allen (rob) on 2008-06-07T11:39:38.000+0000

Thanks for finding this!

Fixed on trunk (svn r9627) Fixed on 1.5 branch (svn r9628)



Posted by Wil Sinclair (wil) on 2008-09-02T10:39:12.000+0000

Updating for the 1.6.0 release.

Have you found an issue?

See the Overview section for more details.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.