my $e = $self->_checkperm($type, $a, $$options{permorg});
if($e) {
$self->event($e);
- return undef;
+ # Per method comment, search always returns []
+ # on failure. Much other code depends on that
+ # behavior.
+ return ($action eq 'search') ? [] : undef;
}
}
$self->event(
OpenILS::Event->new( 'DATABASE_QUERY_FAILED',
payload => $arg, debug => "$err" ));
- return undef;
+ # Per method comment, search always returns []
+ # on failure. Much other code depends on that
+ # behavior.
+ return ($action eq 'search') ? [] : undef;
}
- return undef;
+ # Per method comment, search always returns []
+ # on failure. Much other code depends on that
+ # behavior.
+ return ($action eq 'search') ? [] : undef;
}
if( $action eq 'create' and $obj == 0 ) {
$self->event(
OpenILS::Event->new( 'DATABASE_QUERY_FAILED',
payload => $arg, debug => "$err" ));
- return undef;
+ # Per method comment, search always returns []
+ # on failure. Much other code depends on that
+ # behavior.
+ return ($action eq 'search') ? [] : undef;
}
if( $action eq 'search' ) {