Back to zero bugs
I’ve just finished going through the open Zend_Config issues and fixing them all. Nothing major, but a couple of nice fixes and one new function.
The bugs recently fixed are:
- ZF-2209 Zend_Config* contructor should have the section defaults to null
- ZF-2162 Zend_Config_Xml usage without sections bug
- ZF-2021 Zend_Config::toArray() does not support generic object values
Lastly, I’ve added a new function called setReadOnly() in response to issue ZF-2061. This allows you to lock down a Zend_Config object after merging it with another one. For example:
$defaultConf = new Zend_Config($default_conf_array, true); // allow modifications so we can merge
$userConf = new Zend_Config($user_conf_array);
$defaultConf now contains the merged data, but is still open for modifications, so could be modified at any time. This is not good. setReadOnly() will turn off the modifications flag like this:
Not a big addition, but very nice, nevertheless!