]> git.koha-community.org Git - koha.git/commit
Bug 11587: get rid of warnings generated by IsSuperLibrarian with anonymous sessions
authorMark Tompsett <mtompset@hotmail.com>
Tue, 21 Jan 2014 05:41:00 +0000 (00:41 -0500)
committerFridolin Somers <fridolin.somers@biblibre.com>
Thu, 7 Aug 2014 08:05:49 +0000 (10:05 +0200)
commita7d46e6ac9d0c1234c049dde9af8c73de58f2aba
tree140ae6c84eaa6350c7b1b81d3d990d12d4801126
parent50b2d2abb918e2aff134fc2eb37400cca71daddd
Bug 11587: get rid of warnings generated by IsSuperLibrarian with anonymous sessions

This corrects line 1250 of C4/Context.pm to be:
    return ($userenv->{flags}//0) % 2;
And thus avoids an uninitialized value used in the modulus.

TEST PLAN
---------
1) Apply the first patch (to update t/Context.t)
2) prove -v t/Context.t
-- This should fail tests 7 and 8
3) Apply this patch (to fix C4/Context.pm)
4) prove -v t/Context.t
-- All tests should succeed

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit bf3b1aac7b7bc422bea26bb2c045be69d93ef0bf)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
C4/Context.pm