ZF-4222: Zend_Layout::render include two nonexistent method in Zend_View_Interface

Issue Type: Bug Created: 2008-09-08T02:05:44.000+0000 Last Updated: 2008-09-12T10:42:31.000+0000 Status: Resolved Fix version(s): - 1.6.1 (15/Sep/08)

Reporter: Ben Yan (ben_yan) Assignee: Ralph Schindler (ralph) Tags: - Zend_Layout

  • Zend_View

Related issues: Attachments:


// 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())) {
    } elseif (null !== ($path = $this->getViewBasePath())) {
        $view->{color:red}addBasePath{color}($path, $this->_viewBasePrefix);

    return $view->render($name);


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

Have you found an issue?

See the Overview section for more details.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.