ZF-4222: Zend_Layout::render include two nonexistent method in Zend_View_Interface
Description
// line 712 @ ZF 1.6.0
public function render($name = null)
{
...
// $this->getView() will return an instance of Zend_View_Interface
$view = $this->getView();
// *but the Zend_View_Interface has no addScriptPath() and addBasePath() method*
if (null !== ($path = $this->getViewScriptPath())) {
$view->{color:red}addScriptPath{color}($path);
} elseif (null !== ($path = $this->getViewBasePath())) {
$view->{color:red}addBasePath{color}($path, $this->_viewBasePrefix);
}
return $view->render($name);
}
Comments
Posted by Matthew Weier O'Phinney (matthew) on 2008-09-10T11:11:15.000+0000
Actually, Zend_View_Interface does have addBasePath(), just not addScriptPath(). Additionally, Z_V_I has setScriptPath(), but no addScriptPath(). The solution is to check with method_exists() and switch based on it.
Posted by Ralph Schindler (ralph) on 2008-09-12T10:42:31.000+0000
Fixed in trunk at r11375 Fixed in release 1.6 at r11376