From fbdbb28422e415a46e5c10381dfadb51fc8ab2ff Mon Sep 17 00:00:00 2001 From: Mark Tompsett Date: Thu, 19 Sep 2013 23:25:46 -0400 Subject: [PATCH] Bug 10900 - Incorrect calling conventions accessing C4::Context As the results of trying to roll a distribution, t/Circulation_bardcodedecode.t was discovered to be faulty. The cause being incorrect parameters! This was hidden when there was no shift in the set_userenv routine. However, with its correction, the test broke. This led me to read the POD documentation for the function set_userenv in C4::Context and realize that was outdated as well. It has been revised to match the current version of the function. --- C4/Context.pm | 7 ++++--- t/Circulation_barcodedecode.t | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/C4/Context.pm b/C4/Context.pm index 25a06ce..6f523eb 100644 --- a/C4/Context.pm +++ b/C4/Context.pm @@ -1099,9 +1099,10 @@ sub userenv { =head2 set_userenv - C4::Context->set_userenv($usernum, $userid, $usercnum, $userfirstname, - $usersurname, $userbranch, $userflags, $emailaddress, $branchprinter, - $persona); + C4::Context->set_userenv($usernum, $userid, $usercnum, + $userfirstname, $usersurname, + $userbranch, $branchname, $userflags, + $emailaddress, $branchprinter, $persona); Establish a hash of user environment variables. diff --git a/t/Circulation_barcodedecode.t b/t/Circulation_barcodedecode.t index f76f7fc..f0b6466 100644 --- a/t/Circulation_barcodedecode.t +++ b/t/Circulation_barcodedecode.t @@ -6,7 +6,7 @@ use warnings; use Test::More tests => 26; C4::Context->_new_userenv(123456); -C4::Context->set_userenv(1,'kmkale' , 1, 'kk1' , 'IMS', 0, 'kmkale@anantcorp.com'); +C4::Context->set_userenv(1,'kmkale' , 1, 'km', 'kale' , 'IMS', 'IMS Branch Description', 0, 'kmkale@anantcorp.com'); BEGIN { use_ok('C4::Circulation'); -- 1.7.9.5