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>
This commit is contained in:
parent
850e7e5835
commit
bf3b1aac7b
|
|
@ -1251,7 +1251,7 @@ sub IsSuperLibrarian {
|
|||
return 1;
|
||||
}
|
||||
|
||||
return $userenv->{flags} % 2;
|
||||
return ($userenv->{flags}//0) % 2;
|
||||
}
|
||||
|
||||
1;
|
||||
|
|
|
|||
Loading…
Reference in New Issue