]> git.koha-community.org Git - koha.git/commit
Bug 31383: (QA follow-up) Do not return 0 in ->get
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Wed, 21 Jun 2023 11:48:27 +0000 (11:48 +0000)
committerTomas Cohen Arazi <tomascohen@theke.io>
Fri, 20 Oct 2023 17:44:00 +0000 (14:44 -0300)
commit772337f5257c3099e36ea4127d0192eb3c167e76
tree7e7a7aafd0cb8cdf444e8e7a80bbc0a69305d165
parenta072b5305e941e24b5faf1a5a4c79b06846eca02
Bug 31383: (QA follow-up) Do not return 0 in ->get

The last statement evaluated is the if( $content->count ).
If that evaluates to false, the false expression value is returned.
In this case that is 0.
We should just return undef or empty list (scalar/list context).

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Koha/Template/Plugin/AdditionalContents.pm