Closed (fixed)
Project:
Drupal core
Version:
7.x-dev
Component:
menu system
Priority:
Minor
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
4 Aug 2006 at 17:32 UTC
Updated:
2 Sep 2010 at 07:47 UTC
If two items have the same weight and no title, _menu_sort() always returns 1.
This means that for two menu items $a and $b it's possible that _menu_sort($a, $b) and _menu_sort($b, $a) both return 1. This results in undefined behavior in usort().
Comments
Comment #1
magico commentedThe same code exists in HEAD
This problem would only occur in one circunstance: two menu items with the same weight and exactly the same title (it is not possible to create menus without title).
But the last statement returns at least a possible "1", so I really don't know what is the problem.
Comment #2
lilou commentedThis bug is it still valid ?
Comment #3
kars-t commentedThe _menu_sort() function is not anymore part of Drupal and as far as I can see in menu.inc all data is ordered by weight. So imo no sort is needed any more or done by PHP functions. I am closing this as fixed.