Zend Framework

$this->_optionKeys is not updated if additional top level options are set in Zend_Application_Bootstrap_BootstrapAbstract

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.9.2
  • Fix Version/s: 1.9.3
  • Component/s: Zend_Application
  • Labels:
    None

Description

It looks as though if you decided for some reason to add top-level options later, it would not update $this->_optionKeys

Zend_Application_Bootstrap_BootstrapAbstract:115

$this->_options = $this->mergeOptions($this->_options, $options);

$options = array_change_key_case($options, CASE_LOWER);
$this->_optionKeys = array_keys($options);

optionKeys is only being updated with the new options. You could probably get away with changing the last line to

$this->_optionKeys += array_keys($options);

or

$this->_optionKeys = array_keys($this->_options);

Regards

Activity

Hide
Matthew Weier O'Phinney added a comment -

I ended up needing to do:

$this->_optionKeys = array_merge($this->_optionKeys, array_keys($options));

Fix applied in trunk and 1.9 release branch.

Show
Matthew Weier O'Phinney added a comment - I ended up needing to do:
$this->_optionKeys = array_merge($this->_optionKeys, array_keys($options));
Fix applied in trunk and 1.9 release branch.

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: