<commit_before><commit_msg>fix internal server error in memberentry<commit_after>diff --git a/members/memberentry.pl b/members/memberentry.pl
--- a/members/memberentry.pl
+++ b/members/memberentry.pl
@@ -305,7 +305,7 @@ if ($op eq 'save' || $op eq 'insert'){
     if ( $newdata{dateofbirth} ) {
         my $age = GetAge($newdata{dateofbirth});
         my $borrowercategory = Koha::Patron::Categories->find($newdata{categorycode});
-        my ($low,$high) = ($borrowercategory->dateofbirthrequired, $borrowercategory->upperagelimit);
+        my ($low,$high) = ($borrowercategory->dateofbirthrequired, $borrowercategory->upperagelimit) if $borrowercategory;
         if (($high && ($age > $high)) or ($age < $low)) {
             push @errors, 'ERROR_age_limitations';
             $template->param( age_low => $low);

{'fraction_non_alphanumeric': 0.17073170731707318, 'fraction_numerical': 0.00975609756097561, 'mean_word_length': 3.886904761904762, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4815140', 'n_tokens_mistral': 276, 'n_tokens_neox': 273, 'n_words': 51}