[Koha-bugs] [Bug 21475] Error in the OPAC when viewing a record which has no biblio-level itemtype
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Thu Oct 18 15:23:39 CEST 2018
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21475
--- Comment #9 from Julian Maurice <julian.maurice at biblibre.com> ---
Comment on attachment 80595
--> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=80595
Bug 21475: Fix crash on missing default itemtype
Review of attachment 80595:
--> (https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=21475&attachment=80595)
-----------------------------------------------------------------
::: opac/opac-detail.pl
@@ +762,5 @@
> my $artreqpossible = $patron
> ? $biblio->can_article_request( $patron )
> + : $itemtype
> + ? $itemtype->may_article_request
> + : q{};
I think it's odd to return an empty string for what seems to be a boolean
value. I can see that can_article_request and may_article_request do the same
thing so it's consistent.
But why not return simply 0 (as 1 is used for the true value) ? And why q{}
instead of just '' ? Is there some kind of consensus about this that I'm not
aware of ?
(Note that this will not block QA, I'm just curious)
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list