I have these messages always when people use the dropbox in taxonomy HS.

usort() [<a href='function.usort'>function.usort</a>]:  
Array was modified by the user comparison function in
(...)sites/all/modules/hierarchical_select/hierarchical_select.module  
at line 2141

The function there is:

usort($dropbox->lineages, '_hierarchical_select_dropbox_sort');

and the comparision function is:

function _hierarchical_select_dropbox_sort($lineage_a, $lineage_b) {
  $string_a = implode('', array_map('_hierarchical_select_dropbox_lineage_item_get_label', $lineage_a));
  $string_b = implode('', array_map('_hierarchical_select_dropbox_lineage_item_get_label', $lineage_b));
  return strcmp($string_a, $string_b);
}

Is there a fix for this array_map function, maybe a loop that not affects the arrays?

Comments

Wim Leers’s picture

Assigned: Unassigned » Wim Leers
Status: Active » Postponed (maintainer needs more info)

Can you reproduce this in a vanilla Drupal installation?

Wim Leers’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)

Closing due to lack of response. Feel free to reopen.

crea’s picture

Status: Closed (cannot reproduce) » Active

I had this error too. However, I can't reproduce it reliably.

kenorb’s picture

Issue summary: View changes
Status: Active » Closed (cannot reproduce)