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

--- Comment #3 from Martin Renvoize (ashimema) 
<[email protected]> ---
Created attachment 199332
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=199332&action=edit
Bug 42161: Fix identify_updated_extended_attributes for patrons with no prior
attributes

Two bugs in identify_updated_extended_attributes caused OPAC patron
attribute updates to be silently lost:

1. $patron_attribute_types and $passed_attribute_types were declared as
   undef rather than empty hashrefs. When a patron had zero existing
   opac_editable attributes, `keys %{undef}` raised a fatal error,
   swallowing the modification request entirely.

2. The `any` check when comparing values did not filter by attribute
   code. If any other submitted attribute happened to share the same
   value as the existing value being tested (e.g. two empty-string
   attributes), the change was incorrectly treated as a no-op.

Adds two new test cases covering both failure modes.

Sponsored-by: OpenFifth <https://openfifth.co.uk/>

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to