Bug 5066

Summary: Incorrect use of localtime function when calling _session_log
Product: Koha Reporter: Marcel de Rooy <m.de.rooy>
Component: AuthenticationAssignee: Marcel de Rooy <m.de.rooy>
Status: CLOSED FIXED QA Contact: Bugs List <koha-bugs>
Severity: trivial    
Priority: PATCH-Sent (DO NOT USE) CC: chris, dpavlin
Version: Main   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:

Description Marcel de Rooy 2010-07-28 13:51:38 UTC
The function localtime is called a couple of times in C4/Auth.pm in list context rather than scalar context.
Patch sent for 3.0.x
Comment 1 Marcel de Rooy 2010-11-04 09:22:40 UTC
Problem still occurred on one place in code. Patch sent for master (3.4).

diff --git a/C4/Auth.pm b/C4/Auth.pm
index 6ba852d..58ce63e 100644
--- a/C4/Auth.pm
+++ b/C4/Auth.pm
@@ -717,7 +717,7 @@ sub checkauth {
                    ( $return, $cardnumber ) = checkpw( $dbh, $userid, $password, $query );
                }
                if ($return) {
-               _session_log(sprintf "%20s from %16s logged in  at %30s.\n", $userid,$ENV{'REMOTE_ADDR'},localtime);
+               _session_log(sprintf "%20s from %16s logged in  at %30s.\n", $userid,$ENV{'REMOTE_ADDR'},scalar localtime);
                if ( $flags = haspermission(  $userid, $flagsrequired ) ) {
                                        $loggedin = 1;
                }
--
Comment 2 Chris Cormack 2010-11-18 01:25:54 UTC
Patch pushed please test and close
Comment 3 Chris Nighswonger 2010-11-18 03:15:30 UTC
This bug has a patch presently committed to HEAD and 3.2.x.

Please take the appropriate action to update the status of this bug.

Remember, bugs which have been resolved should be tested and marked closed, preferably by the original reporter.
Comment 4 Marcel de Rooy 2010-12-17 14:42:43 UTC
*** Bug 3295 has been marked as a duplicate of this bug. ***