[Koha-bugs] [Bug 18149] Move CountUsage calls to Koha namespace

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Sep 4 08:45:54 CEST 2017


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

--- Comment #4 from Marcel de Rooy <m.de.rooy at rijksmuseum.nl> ---
(In reply to Tomás Cohen Arazi from comment #3)
> Marcel, I agree with the removal, but you seem to be fixing a bug in the
> meantime (which I'm not against per-se) but I think if falls short, as we
> should be warning or similar about those non-existing authority records.

This is about two checks?
[1] opac-authoritiesdetail
-my $authtypecode = $authority->authtypecode;
+my $authtypecode = $authority ? $authority->authtypecode : q{};
This does not fall short. It actually is only theoretical. If GetAuthority
fails, the script redirects to 404.

[2] authorities/detail.pl
-my $authtypecode = Koha::Authorities->find($authid)->authtypecode;
+my $authobj = Koha::Authorities->find($authid);
+my $authtypecode = $authobj ? $authobj->authtypecode: q{};
Similar here. This check just prevents an ISE on authtypecode while a few lines
later the output of GetAuthority is checked and an error is printed via the
template. So no, it does not fall short.

Please explain why this fails QA.

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


More information about the Koha-bugs mailing list