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

Issue Type: Bug Created: 2009-08-26T02:31:55.000+0000 Last Updated: 2009-08-26T05:50:58.000+0000 Status: Resolved Fix version(s): - 1.9.3 (22/Sep/09)

Reporter: John Boehr (jboehr) Assignee: Matthew Weier O'Phinney (matthew) Tags: - Zend_Application

Related issues: Attachments:


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 {quote} $this->_options = $this->mergeOptions($this->_options, $options);

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

{quote} optionKeys is only being updated with the new options. You could probably get away with changing the last line to {quote} $this->_optionKeys += array_keys($options); {quote} or {quote} $this->_optionKeys = array_keys($this->_options); {quote} Regards


Posted by Matthew Weier O'Phinney (matthew) on 2009-08-26T05:50:48.000+0000

I ended up needing to do:

<pre class="highlight">
$this->_optionKeys = array_merge($this->_optionKeys, array_keys($options));

Fix applied in trunk and 1.9 release branch.

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.