[Koha-bugs] [Bug 8917] Track clicks to links external to Koha
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Tue Feb 26 17:00:07 CET 2013
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8917
Bernardo Gonzalez Kriegel <bgkriegel at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|Needs Signoff |Failed QA
--- Comment #28 from Bernardo Gonzalez Kriegel <bgkriegel at gmail.com> ---
Well, I found Kyle's problem with logged in user.
Software error:
Can't use string ("") as a HASH ref while "strict refs" in use at
/home/bgkriegel/kohaclone/C4/Auth.pm line 1682
Digging a little, I found:
1) in tracklinks.pl you call "checkauth( $cgi, 1, '', 'opac' );"
2) in C4/Auth.pm ^ THIS
sub checkauth {
my $query = shift;
$debug and warn "Checking Auth";
# $authnotrequired will be set for scripts which will run without
authentication
my $authnotrequired = shift;
my $flagsrequired = shift; <----------- HERE
my $type = shift;
my $persona = shift;
$type = 'opac' unless $type;
3) some lines later, $flagsrequired is used in
$flags = haspermission($userid, $flagsrequired);
4) more lines later, in haspermission()
(1682) foreach my $module ( keys %$flagsrequired ) {
And that's the error's line.
5) $flagsrequired need to be a hashref, you send ''
6) If I change 1) to
checkauth( $cgi, 1, {}, 'opac' );
now Koha is happy and logs the correct user in linktracker table.
(Perl (v5.14.2) built for x86_64-linux-gnu-thread-multi)
Perhaps declaring args and then using them in checkout()
would be cleaner and more understandable.
7) Not related, koha-qa complains of tabulations in updatedatabase.pl, I could
fix that.
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list