ContainerConfig::getConfig
--------------------------
Key: SHINDIG-450
URL: https://issues.apache.org/jira/browse/SHINDIG-450
Project: Shindig
Issue Type: Bug
Components: Features (Javascript)
Reporter: Erel Segal
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.