Issues

ZF-7595: General issues with Zend_Application

Issue Type: Bug Created: 2009-08-14T05:35:30.000+0000 Last Updated: 2009-09-04T12:18:34.000+0000 Status: Resolved Fix version(s): - 1.9.2 (25/Aug/09)

Reporter: Holger Schäfer (hschaefer123) Assignee: Matthew Weier O'Phinney (matthew) Tags: - Zend_Application

Related issues: Attachments:

Description

Starting with Zend_Application i figured out that the examples in the ZF manual does not work.

Keys from array constructor are handled as lowercase, but after this point additional keys from config will not be converted to lowercase -> the zf docu lacks, because examples like resource.frontController = xxx inside config will not work (but work using setOptions)

<pre class="highlight">
public function setOptions(array $options){
        $options = array_change_key_case($options, CASE_LOWER);
        if (!empty($options['config'])) {
            $options = $this->mergeOptions($options, $this->_loadConfig($options['config']));
        }...

The problem is, that lower case is apllied on the $options array, but later on loading default options from config is not handled the same way.

Comments

Posted by Timothy Rule (trule) on 2009-08-28T13:25:13.000+0000

I came across the same problem, I used the following fix for now:

<pre class="highlight"> 
    public function setOptions(array $options)
    {
        $options = array_change_key_case($options, CASE_LOWER);

        if (!empty($options['config'])) {
            $configOptions = $this->_loadConfig($options['config']);
            $configOptions = array_change_key_case($configOptions, CASE_LOWER);
                $options = $this->mergeOptions($options, $configOptions);
        }

Posted by Matthew Weier O'Phinney (matthew) on 2009-08-30T11:47:11.000+0000

Please try with 1.9.2; this functionality has changed with the introduction of that release, and the problem may now be a non-issue.

Posted by Timothy Rule (trule) on 2009-09-04T12:03:47.000+0000

Its fixed for me, with version 1.9.2.

Thanks.

Have you found an issue?

See the Overview section for more details.

Copyright

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

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

Contacts