protecting myself against 0 search terms
authormiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 1 Feb 2006 21:31:30 +0000 (21:31 +0000)
committermiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 1 Feb 2006 21:31:30 +0000 (21:31 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@2928 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/metabib.pm

index b77055f..44ec377 100644 (file)
@@ -1201,6 +1201,14 @@ sub postfilter_search_multi_class_fts {
        my $limit = $args{limit};
        my $offset = $args{offset} || 0;
 
+       if (! scalar( keys %{$args{searches}} )) {
+               die "No target organizational unit passed to ".$self->api_name;
+       }
+
+       if (! scalar( keys %{$args{searches}} )) {
+               die "No search arguments were passed to ".$self->api_name;
+       }
+
        my $outer_limit = 1000;
 
        my $limit_clause = '';