If its a verifiable, repeatable bug (and it actually is a bug, not
something by design), go for it. :)
On Jan 12, 8:43 am, lordG <[EMAIL PROTECTED]> wrote:
> ok, i sourced the problem down to...
>
> 1) the subsomponent does get loaded.
> 2) the reference to subcomponents is miss calculated if a sub
> component is a PluginName.ComponentName... It tries to make the object
> $PluginName.ComponentName, but natuarally in the $loaded array it only
> exists as $ComponentName, so the reference gets lost.
>
> So, this is what lines 75 - 85 (component.php) did read
> -----
> foreach (array_keys($loaded) as $component) {
> $tempComponent =& $loaded[$component];
> if (isset($tempComponent->components) &&
> is_array($tempComponent->components)) {
>
> foreach ($tempComponent->components as $subComponent) {
> $this->controller->{$component}->{$subComponent} =&
> $loaded[$subComponent];
> }
> }
> if (is_callable(array($tempComponent, 'initialize'))) {
> $tempComponent->initialize($controller);
> }}
>
> ----
> Which is now
> ----
> foreach (array_keys($loaded) as $component) {
> $tempComponent =& $loaded[$component];
> if (isset($tempComponent->components) &&
> is_array($tempComponent->components)) {
>
> foreach ($tempComponent->components as $subComponent) {
>
> //needs to split the component if its a Plugin
> if (strpos($subComponent, '.') !== false) {
> list($tempPlugin, $subComponent) =
> explode('.', $subComponent);
> }
>
> $this->controller->{$component}->{$subComponent} =&
> $loaded[$subComponent];
> }
> }
> if (is_callable(array($tempComponent, 'initialize'))) {
> $tempComponent->initialize($controller);
> }}
>
> ----
>
> So this fixed the problem.... should I post a bug ticket?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---