[Koha-bugs] [Bug 18400] Noisy warns in opac-search.pl during itemtype sorting

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri May 12 11:04:59 CEST 2017


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18400

--- Comment #8 from Marcel de Rooy <m.de.rooy at rijksmuseum.nl> ---
Created attachment 63417
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=63417&action=edit
Bug 18400: [QA Follow-up] Move sort outside the loop

GetItemTypesCategorized can return descriptions that are still undef since
Authorized values does not enforce a description in lib and lib_opac.
When I add one ITEMTYPECAT auth value without descriptions, I can still
generate the string comparison warnings on the itemtypes sort.
In order to prevent the warning, we should add an empty string in the
assignment on line 229.

We do not need to copy the itemtypes hash if we move the sort outside the
@advanced_search_types foreach. There is no need to sort it more than once.
Note that I did not see any reasons btw for corruption of the structure
inside this loop.

Note: If we use ITEMTYPECAT without descriptions, we should probably leave
them out. No need to show a checkbox without description on Advanced Search,
but I would recommend to solve that on its own report. The whole ITEMTYPECAT
functionality has imo not been designed properly.

Signed-off-by: Marcel de Rooy <m.de.rooy at rijksmuseum.nl>

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list