You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shindig.apache.org by "Chris Chabot (JIRA)" <ji...@apache.org> on 2008/10/09 09:30:44 UTC

[jira] Resolved: (SHINDIG-450) ContainerConfig::getConfig

     [ https://issues.apache.org/jira/browse/SHINDIG-450?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Chris Chabot resolved SHINDIG-450.
----------------------------------

    Resolution: Fixed
      Assignee: Chris Chabot

looks good to me, nice catch erel!

> ContainerConfig::getConfig
> --------------------------
>
>                 Key: SHINDIG-450
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-450
>             Project: Shindig
>          Issue Type: Bug
>          Components: Gadget Rendering Server (PHP)
>            Reporter: Erel Segal
>            Assignee: Chris Chabot
>   Original Estimate: 0.08h
>  Remaining Estimate: 0.08h
>
> Reading the code of the getConfig function in ContainerConfig, I think I detected a bug or two in the following passage:
> 		if ($container != $this->default_container && isset($this->config[$container][$name])) {
> 			$config = $this->mergeConfig($this->config[$container][$name], $config);
> 		}
> a. the call to "isset($this->config[$container][$name])" may cause an error if $this->config[$container] is not set (it is tested in the previous passage but not tested here).
> b. In any case, the merge seems useless, since "$config" will anyway contain "$this->config[$container][$name]".
> I think what you meant to say is:
> 		if ($container != $this->default_container && isset($this->config[$this->default_container]) && isset($this->config[$this->default_container][$name])) {
> 			$config = $this->mergeConfig($this->config[$this->default_container][$name], $config);
> 		}
> in order to merge default configuration options into the selected configuration.
> Am I right?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.