Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
}
my $patrons_pending_suggestions_count = 0;
}
my $patrons_pending_suggestions_count = 0;
-if ( $borrowernumber ) {
+if ( $borrowernumber && C4::Context->preference("MaxOpenSuggestions") ne '' ) {
$patrons_pending_suggestions_count = scalar @{ SearchSuggestion( { suggestedby => $borrowernumber, STATUS => 'ASKED' } ) } ;
}
$patrons_pending_suggestions_count = scalar @{ SearchSuggestion( { suggestedby => $borrowernumber, STATUS => 'ASKED' } ) } ;
}