Zend Framework

Zend_Layout::render include two nonexistent method in Zend_View_Interface

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Major 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);
}

Activity

Hide
Matthew Weier O'Phinney added a comment -

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.

Show
Matthew Weier O'Phinney added a comment - 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.
Hide
Ralph Schindler added a comment -

Fixed in trunk at r11375
Fixed in release 1.6 at r11376

Show
Ralph Schindler added a comment - Fixed in trunk at r11375 Fixed in release 1.6 at r11376

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: