[Koha-bugs] [Bug 26751] Fatal exception if only one repo defined

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Oct 22 01:15:52 CEST 2020


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

--- Comment #7 from David Cook <dcook at prosentient.com.au> ---
(In reply to Martin Renvoize from comment #5)
> This patch fixes this nasty problem with how XML is parsed: if more than
> one entry is found, repo => [] is generated. If only one, repo => {}.

To nitpick, the nasty problem is just due to XML::Simple being problematic.
Grant McLean (who is at Kohacon2020 and works at Catalyst IT) doesn't that
people use it in new code, and I reckon we should work on just taking it out of
our code.

By the way, an alternative to this patch would be to update the forcearray
option in Koha::Config::read_from_file. (See
https://metacpan.org/pod/XML::Simple#ForceArray-=%3E-1-%23-in-important for
more information)

In fact, it might be better to use my alternative idea, because then we'd have
more centralized in-code documentation about what config options *need* to be
arrays.

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


More information about the Koha-bugs mailing list