Zend Framework

General issues with Zend_Application

Details

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

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)

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.

Activity

Hide
Timothy Rule added a comment -

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

Application.php
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);
        }
Show
Timothy Rule added a comment - I came across the same problem, I used the following fix for now:
Application.php
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);
        }
Hide
Matthew Weier O'Phinney added a comment -

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.

Show
Matthew Weier O'Phinney added a comment - 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.
Hide
Timothy Rule added a comment -

Its fixed for me, with version 1.9.2.

Thanks.

Show
Timothy Rule added a comment - Its fixed for me, with version 1.9.2. Thanks.

People

Vote (1)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: