http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11077
M. Tompsett <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #23199|0 |1 is obsolete| | --- Comment #33 from M. Tompsett <[email protected]> --- Created attachment 23214 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=23214&action=edit Bug 11077 - Correct silent warnings in C4/Auth.pm This patch corrects a noisy ne condition. $userid = $retuserid if ( $retuserid ne ''); became $userid = $retuserid if ( $retuserid ); It also integrates Srdjan Jankovic's patch with Petter Goksoyrsen's patch, while correcting the problems found. This includes: my $q_userid = $query->param('userid') // ''; along with: my $s_userid = ''; and: my $s_userid = $session->param('id') // ''; Indentation does not reflect actual scoping. And the 'None' is changed to '', since that behaves properly in the undef case: my $pki_field = C4::Context->preference('AllowPKIAuth'); if (!defined($pki_field)) { print STDERR "Error: Missing AllowPKIAuth System Preference!\n"; $pki_field = ''; } Because if it was set to 'None' in the undefined case, then 'None' ne 'None' is false, and the if case would not run. However, undef ne 'None' is true and runs with an error log entry. By putting the define check as a separate if clause, a meaningful error message can be given rather than a ubiquitous undef compare check failure message. -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
