[horde] Problem with renderNodeDefinitions in sidebar.php

Jan Schneider jan at horde.org
Wed Jan 19 07:19:53 PST 2005


Can you please add a ticket for this on bugs.horde.org?

Zitat von Juan Germano <jigermano at uolsinectis.com.ar>:

>
>
>    In line 213 of
>    horde/services/portal/sidebar.php
>    we have:
>
>    $tree = &Horde_Tree::singleton('horde_menu', 'javascript');
>
>    Now, we are not guaranteed  to actually get a Horde_Tree_javascript
>    instance because of this:
>    Horde/Tree.php
>
>         function &singleton($name, $renderer, $params = array())
>         {
>             static $instances = array();
>
>             $id = $name . ':' . $renderer . ':' . serialize($params);
>             if (!isset($instances[$id])) {
>                 $instances[$id] = &Horde_Tree::factory($name, $renderer,
>    $params);
>                 if (!$instances[$id]->isSupported()) {
>                     $renderer = Horde_Tree::fallback($renderer);
>                     if (is_a($renderer, 'PEAR_Error')) {
>                         return $renderer;
>                     }
>                     return Horde_Tree::singleton($name, $renderer, $params);
>                 }
>             }
>
>             return $instances[$id];
>         }
>
>    $instances[$id]->isSupported() may not always true:
>    Horde/Tree/javascript.php
>
>         function isSupported()
>         {
>             return $GLOBALS['browser']->hasFeature('dom');
>         }
>
>    We may get a Horde_Tree_html which has no method renderNodeDefinitions,
> so
>    horde/services/portal/sidebar.php, line 276
>
>         echo $tree->renderNodeDefinitions();
>
>    Is throwing  a Call to an undefined function:  rendernodedefinitions()
>
>    with a  browser without DOM support.
>
>    --
>    Juan
>
> -- Horde mailing list - Join the hunt: http://horde.org/bounties/#horde
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: horde-unsubscribe at lists.horde.org
>
>



Jan.

-- 
Do you need professional PHP or Horde consulting?
http://horde.org/consulting/



More information about the horde mailing list