Use asort instead of ksort

marcingy - August 28, 2008 - 01:17
Project:Admin Role
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:by design
Description

If a role is deleted and then an admin role is selected ksort causes the incorrect array value to be set in adminrole_adminrole. Instead asort should be used as this maintains the assocaited key order. I'd role a patch but.. as this is basically a one letter change on line 67 it doesn't seem worth it ;-)

#1

marcingy - August 28, 2008 - 01:17
Status:active» needs review

#2

marcingy - August 28, 2008 - 01:26

On further investigation more changes are required so here is a patch

AttachmentSize
admin role.patch 857 bytes

#3

marcingy - August 28, 2008 - 01:28
Title:ksort cause incorrect results» ksort cause incorrect results when role has been deleted

#4

Bevan - January 7, 2009 - 20:49
Status:needs review» postponed (maintainer needs more info)

I can't reproduce this bug. Please retest with drupal 6 dev and provide more detailed instructions to reproduce

#5

Bevan - January 7, 2009 - 21:14
Title:ksort cause incorrect results when role has been deleted» Use asort instead of ksort

#6

Dave Reid - November 25, 2009 - 03:36
Status:postponed (maintainer needs more info)» by design

ksort maintains key => value associations so I don't see a bug here.

 
 

Drupal is a registered trademark of Dries Buytaert.