Bug 40641: Fallback to empty values when logging action
Bug 22632 introduced the merge logging feature but missed to sanitize strings to avoid warnings. This patch fixes that. To test: 1. Run: $ ktd --shell k$ prove t/db_dependent/Patron/Borrower_Debarments.t => FAIL: Tests fail! Warnings introduced! 2. Apply this patch 3. Repeat 1 => SUCCESS: Tests pass! 4. Sign off :-D Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
parent
3ea3c2a27a
commit
8d2f2f25bf
|
|
@ -795,13 +795,13 @@ sub merge_with {
|
|||
|
||||
if ( C4::Context->preference("BorrowersLog") ) {
|
||||
my $info =
|
||||
$patron->firstname . " "
|
||||
. $patron->surname . " ("
|
||||
. $patron->cardnumber . ")"
|
||||
( $patron->firstname // "" ) . " "
|
||||
. ( $patron->surname // "" ) . " ("
|
||||
. ( $patron->cardnumber // "" ) . ")"
|
||||
. " has been merged into "
|
||||
. $self->firstname . " "
|
||||
. $self->surname . " ("
|
||||
. $self->cardnumber . ")";
|
||||
. ( $self->firstname // "" ) . " "
|
||||
. ( $self->surname // "" ) . " ("
|
||||
. ( $self->cardnumber // "" ) . ")";
|
||||
logaction( "MEMBERS", "PATRON_MERGE", $self->id, $info );
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue