http://bugs.koha.org/cgi-bin/bugzilla/show_bug.cgi?id=2880 Summary: Pages pass 'loggedinuser' parameter to templates even if unset Product: Koha Version: HEAD Platform: PC OS/Version: All Status: NEW Severity: normal Priority: P3 Component: Architecture, internals, and plumbing AssignedTo: galen.charlton@liblime.com ReportedBy: koha@brinkerhoff.org QAContact: koha-bugs@lists.koha.org Each time a user loads the 'intranet' (http://host/) my logfile logs an error for: [Mon Dec 22 14:51:01 2008] [error] [client 192.168.1.139] EXPR:at pos 25: non-initialized variable loggedinusername, referer: http://192.168.1.125/cgi-bin/koha/opac-tags.pl [Mon Dec 22 14:51:04 2008] [error] [client 192.168.1.139] EXPR:at pos 25: non-initialized variable loggedinusername, referer: http://192.168.1.125/cgi-bin/koha/opac-tags.pl?limit=100&hidemytags=1 [Mon Dec 22 14:51:04 2008] [error] [client 192.168.1.139] EXPR:at pos 25: non-initialized variable loggedinusername, referer: http://192.168.1.125/cgi-bin/koha/opac-tags.pl?limit=100&hidemytags=1 [Mon Dec 22 14:52:01 2008] [error] [client 192.168.1.139] EXPR:at pos 25: non-initialized variable loggedinusername, referer: http://192.168.1.125/cgi-bin/koha/opac-tags.pl?limit=100&hidemytags=1 [Mon Dec 22 14:52:01 2008] [error] [client 192.168.1.139] EXPR:at pos 25: non-initialized variable loggedinusername, referer: http://192.168.1.125/cgi-bin/koha/opac-tags.pl?limit=100&hidemytags=1 Could simply returning an empty template variable remove most of these errors? (I didn't test thoroughly, but it didn't seem to break anything). stan@koha-dev:~/kohaclone/C4$ git diff diff --git a/C4/Auth.pm b/C4/Auth.pm index 871929e..11b8173 100644 --- a/C4/Auth.pm +++ b/C4/Auth.pm @@ -243,7 +243,8 @@ sub get_template_and_user { $template->param( js_widgets => $in->{'js_widgets'} ); $template->param( sessionID => $sessionID ); - + $template->param( loggedinusername => '' ); + my ($total, $pubshelves) = C4::Context->get_shelves_userenv(); # an anonymous user has no 'barshelves'... if (defined(($pubshelves))) { $template->param( pubshelves => scalar (@$pubshelves), ------- You are receiving this mail because: ------- You are the QA contact for the bug, or are watching the QA contact.