[Koha-bugs] [Bug 16015] Cannot delete a group of libraries
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Fri Mar 11 04:06:20 CET 2016
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16015
Srdjan Jankovic <srdjan at catalyst.net.nz> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |srdjan at catalyst.net.nz
--- Comment #2 from Srdjan Jankovic <srdjan at catalyst.net.nz> ---
This is totally weird. It must be that $libraries_count gets interpreted as
"0". Perl, I did not expect that from you.
Anyway, although this patch does solve the issue, pedantic devil in me says -
wait.
The way it is written says
my $libraries_count = (scalar( $category->libraries ) > 0)
which does yield correct boolean, but evaluates to 1 no matter how many
libraries are there.
Correct way could be
my $libraries_count = scalar( $category->libraries ) + 0
or
(my $libraries_count = scalar( $category->libraries )) > 0
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list