Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 2.2.0

Bug #784 PHP Notice if no url prefix matches a menu entry
Submitted: 2004-02-18 10:08 UTC
From: matthias Assigned: avb
Status: Closed Package: HTML_Menu
PHP Version: Irrelevant OS:
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 41 - 37 = ?

 
 [2004-02-18 10:08 UTC] matthias
Description: ------------ There is a PHP Notice if no url prefix matches a menu entry. If you only have one URL (/news/) in the menu and you enter a URL like /index.php the following notice is thrown: Notice: Undefined index: in /usr/share/pear/HTML/Menu.php on line 462

Comments

 [2004-02-18 23:52 UTC] morten at holdflod dot dk
The error also occurs when inserting urls with querystrings in the menu. ex: <?php array( 1 => array( 'title' => 'Menu item 1', 'url' => '/item1.php?LookHere=ThisGivesAnError', ), 2 => array( 'title' => 'Menu item 2', 'url' => '/item2.php?LookHere=ThisGivesAnError', ) ); ?>
 [2004-02-19 14:22 UTC] avb
By default HTML_Menu assumes that your URLs do not have querystrings. If you want to use URLs with querystings, you should either make HTML_Menu take the "current" URL from the var other than PHP_SELF[1] or set this URL manually[2] [1] http://pear.php.net/manual/en/package.html.html-menu.html-menu.seturlenvvar.php [2] http://pear.php.net/manual/en/package.html.html-menu.html-menu.forcecurrenturl.php
 [2004-02-21 15:48 UTC] avb
Fixed in CVS.