Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Duplicate
-
Affects Version/s: 1.9.2
-
Fix Version/s: 1.9.3
-
Component/s: Zend_Application
-
Labels:None
-
Tags:
Description
Behavior:
Zend_Application_Bootstrap_BootstrapAbstract::setOptions() merges given options but not its keys.
Effect:
If options are set multiple times, only keys of the last options-set are registered. Later calls of Zend_Application_Bootstrap_BootstrapAbstract::hasOption() will fail for overwritten keys.
public function setOptions(array $options)
{
$this->_options = $this->mergeOptions($this->_options, $options);
$options = array_change_key_case($options, CASE_LOWER);
$this->_optionKeys = array_keys($options);
....
Suggested solution:
Replace
$this->_optionKeys = array_keys($options);
with
$this->_optionKeys = array_merge($this->_optionKeys, array_keys($options));
This duplicates
ZF-7690, which is already resolved in trunk and the 1.9 release branch; fixes will be released with 1.9.3.ZF-7690, which is already resolved in trunk and the 1.9 release branch; fixes will be released with 1.9.3.