diff --git a/members/memberentry.pl b/members/memberentry.pl index 17c1f0305a..8903ecfcfa 100755 --- a/members/memberentry.pl +++ b/members/memberentry.pl @@ -280,7 +280,9 @@ if ( ( $op eq 'cud-save' || $op eq 'cud-insert' ) } foreach my $guarantor (@guarantors) { - if ( ( $op eq 'cud-save' || $op eq 'cud-insert' ) && ($guarantor->is_child ) || $guarantor->is_guarantee || $patron->is_guarantor) { + if ( ( $op eq 'cud-save' || $op eq 'cud-insert' ) + && ( $guarantor->is_child || $guarantor->is_guarantee || ( $patron && $patron->is_guarantor ) ) ) + { push @errors, 'ERROR_guarantor_is_guarantee'; } }