[Koha-bugs] [Bug 12916] Use of uninitialized values $max and $min in C4/Tags.pm

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Sat Oct 25 05:23:35 CEST 2014


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12916

Chris Cormack <chris at bigballofwax.co.nz> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #32612|0                           |1
        is obsolete|                            |

--- Comment #12 from Chris Cormack <chris at bigballofwax.co.nz> ---
Created attachment 32701
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=32701&action=edit
Bug 12916 - Use of uninitialized values $max and $min in C4/Tags.pm

When the stratify_tags function is called without any tags, the
$min and $max variables are left undefined, which triggers a
warning message about uninitialized values in the subtraction.

TEST PLAN
---------
1) prove -v t/db_dependent/Tags.t
   -- should succeed, but there is no test for empty tags.
2) Make sure that you have no tags
3) In Opac, go to 'Tag cloud'
4) Check the opac error log file
   (e.g. ~/koha-dev/var/log/koha-opac-error_log) for entries
   regarding uninitialized values $max and $min in C4/Tags.pm
5) apply this patch
6) prove -v t/db_dependent/Tags.t
   -- should still succeed, though no tests are added.
7) Reload page 'Tag cloud'
   -- Result: No additional warnings in opac error log file.

Signed-off-by: Chris <chris at bigballofwax.co.nz>

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


More information about the Koha-bugs mailing list