[Bug 14787] Allow confirm/continue option to circulation warnings at checkout
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14787 Andrii Nugged <nugged@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nugged@gmail.com --- Comment #21 from Andrii Nugged <nugged@gmail.com> --- We probably should have follow up for this, some notes for not to lose the point: my $patron_session_confirmation = $query->cookie('patronSessionConfirmation') || undef; - why screening it to undef? protecting for "" and 0? my ( $patron_for_session, $session_confirmations ) = split( /:/, $patron_session_confirmation, 2 ); - split of undef leads to: [2025/04/28 16:40:52] [WARN] Use of uninitialized value $patron_session_confirmation in split at /usr/share/koha/intranet/cgi-bin/circ/circulation.pl line ... my $patron_match = $borrowernumber == $patron_for_session; - numeric == with undef or '' leads to: [2025/04/28 16:40:52] [WARN] Use of uninitialized value $patron_for_session in numeric eq (==) at /usr/share/koha/intranet/cgi-bin/circ/circulation.pl line ... my @conf_keys = split( /\|/, $session_confirmations ); - and this will make warning: [2025/04/28 16:40:52] [WARN] Use of uninitialized value $session_confirmations in split at /usr/share/koha/intranet/cgi-bin/circ/circulation.pl line ... I'd solve this way (but this is "local solution just for this block" :) ) -> ``` my ( $patron_for_session, $session_confirmations, $patron_match ); my @conf_keys; my $patron_session_confirmation = $query->cookie('patronSessionConfirmation') || undef; if ($patron_session_confirmation) { ( $patron_for_session, $session_confirmations ) = split( /:/, $patron_session_confirmation, 2 ); $patron_match = $borrowernumber == $patron_for_session; @conf_keys = split( /\|/, $session_confirmations ); } $template_params->{sessionConfirmationKeys} = (); ``` -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org