[drupal-devel] [bug] menu error line 974 with MBstring

Robin Monks drupal-devel at drupal.org
Thu May 5 23:43:57 UTC 2005

Issue status update for http://drupal.org/node/22026

 Project:      Drupal
-Version:      4.6.0
+Version:      cvs
 Component:    menu system
 Category:     bug reports
 Priority:     normal
-Assigned to:  Anonymous
+Assigned to:  Robin Monks
 Reported by:  hendler
 Updated by:   Robin Monks
-Status:       active
+Status:       patch
 Attachment:   http://drupal.org/files/issues/menu.inc_0.patch (908 bytes)

We apparently don't check if the object exists before we work on it.


Robin Monks

Previous comments:

May 5, 2005 - 00:15 : hendler

Menu.inc on line 974

 the do {}while() causes an error if $parent is empty because strrpos,
(I have mbstring enabled) may be null
to fix my problem I have this if statement wrapping it, which I
understand is logically equivlent to just doing a while loop.

      if ($parent){
       do {
         $parent = substr($parent, 0, strrpos($parent, '/'));
       while ($parent && !array_key_exists($parent, $_menu['path

This happens just after a new install.

More information about the drupal-devel mailing list