[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 03:36:01 CEST 2020


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

--- Comment #8 from Tomás Cohen Arazi <tomascohen at gmail.com> ---
(In reply to David Cook from comment #7)
> (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.

I'd say we should leave this bug alone, and propose the refactoring in its own
bug, so stable branches can have this feature fixed. Also there might be other
options to explore. I proposed to move things into YAML or JSON, splitting the
Zebra and general config for good.

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


More information about the Koha-bugs mailing list