Closed (works as designed)
Project:
Drupal core
Component:
menu system
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
5 May 2005 at 00:15 UTC
Updated:
30 Jul 2005 at 12:06 UTC
Jump to comment: Most recent file
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 index']));
}
This happens just after a new install.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | menu.inc_0.patch | 908 bytes | robin monks |
Comments
Comment #1
robin monks commentedWe apparently don't check if the object exists before we work on it.
Robin
Comment #2
dries commentedI wonder how I can reproduce this problem. Maybe we are fixing the symptom, not the cause.
Comment #3
mark.stephens commentedI was having this problem with a clean install of drupal 4.6.0. I had mbstrings enabled in PHP. I turned it off, and the problem went away immediately. Within mbstrings, I had:
mbstring.language = English
mbstring.internal_encoding = UTF-8
mbstring.http_output = auto
mbstring.func_overload = 7
PHP 4.3.11.
Mark
Comment #4
robin monks commentedHmm, seems odd.
Since I don't use MBstring it become harder for me to understand the problem. All I know, is my patch dosn't break anything and should be there anyways, in case my some miracle we attempt to work on a non-existant object.
Robin
Comment #5
Steven commentedAs of recently, HEAD supports mbstring, but function overloading is explicitly unsupported. Marking as 'by design'.