toxygene / rend

Automatically exported from code.google.com/p/rend
Other
0 stars 0 forks source link

LayoutSelector postDispatch not working #17

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Rend_Controller_Action_Helper_LayoutSelector

postDispatch() method did not work properly since the $parameter variable
is erroneously being accessed as a character array by PHP.

Currently it is:
$actionController->$parameter[$actionName]

And should be
$layoutSettings = $actionController->$parameter;
$layoutSettings[$actionName]

Full code:
if (isset($actionController->$parameter)) {

    $layoutSettings = $actionController->$parameter;

    if (isset($layoutSettings[$actionName])) {
        $this->_setLayoutScript($layoutSettings[$actionName]);
    } elseif (isset($layoutSettings[self::WILDCARD])) {
        $this->_setLayoutScript($layoutSettings[self::WILDCARD]);
    }
}

Original issue reported on code.google.com by konrn...@gmail.com on 21 Nov 2008 at 10:08

GoogleCodeExporter commented 9 years ago

Original comment by justin.h...@gmail.com on 21 Nov 2008 at 10:23

GoogleCodeExporter commented 9 years ago
Fixed at r313

Original comment by justin.h...@gmail.com on 21 Nov 2008 at 11:00