Re: [phplib] menu.inc troubles under PHP4.04pl1 From: Paolo Brutti (Paolo.Brutti <email protected>)
Date: 01/15/01

Hi,
I've banged my head against this problem when php4 was released:
the problem is that the behaviour of dirname has changed, so that
dirname('/') returns '/' instead of an empty string (or the other way round,
I don't remember).
I've modified menu.inc to work with this, but you should also modify the root
entry in your menu instance, so that it is "/" instead of "".
In other words, when you use my version of menu.inc you should have a menu
like
var $urlmap = array(
    "/menu/index.php3" => "/",
    "/menu/item1.php3" => "/1");
I enclose my version here (it's small, so I don't think anyone will get
angry...)
Bye

On 15:39, luned? 15 gennaio 2001, Alexandr E. Bravo wrote:

> I used for a while menu class from menu.inc of phplib-7.3-dev under PHP3
> without any troubles. Today I switched to current version of PHP4
> (4.04pl1) and found that call to normalize_pos (from get_title or get)
> leads to infinite loop in this function in two following cases:
> 1) if the value of the root menu item is empty (like in example)
> 2) if $PHP_SELF doesn't match any entry in menu tree (which is not
> correct but possible situation).
>
> Could you explain me - this is my mistake or misunderstanding or
> something else ?
>

-- 
Paolo Brutti                |     Abbiamo un accordo con Dio:
Telesoft S.p.a.             |     Lui non scrive programmi,
Tel. +39-06-71035675        |     noi non facciamo miracoli.

--------------------------------------------------------------------- To unsubscribe, e-mail: phplib-unsubscribe <email protected> For additional commands, e-mail: phplib-help <email protected>