elsif ($email) {
$search_results = [ Koha::Patrons->search( { -or => { email => $email, emailpro => $email, B_email => $email } } ) ];
}
if ( not $search_results || scalar @$search_results > 1 ) {
if ( not $search_results || eval { scalar @$search_results > 1 } ) {
$hasError = 1;
$errNoBorrowerFound = 1;
-