Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.6.0
-
Fix Version/s: 1.6.1
-
Component/s: Zend_Layout, Zend_View
-
Labels:None
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->addScriptPath($path);
} elseif (null !== ($path = $this->getViewBasePath())) {
$view->addBasePath($path, $this->_viewBasePrefix);
}
return $view->render($name);
}
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.