The angular staff catalog uses the new print/email records
functionality, but calls it without some expected parameters. This
causes the backend method to fail as it assumes the params will exist.
This commit removes that assumption by testing the length of the
parameter list before attempted to read them.
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Jane Sandberg <sandbergja@gmail.com>
Signed-off-by: Michele Morgan <mmorgan@noblenet.org>
my ($auth, $captcha_pass, $email, $subject);
if ($for_email) {
$auth = shift @_;
- ($captcha_pass, $email, $subject) = splice @_, -3, 3;
+ if (@_ > 5) { # the stuff below is included in the params, safe to splice
+ ($captcha_pass, $email, $subject) = splice @_, -3, 3;
+ }
}
my ($bib_id, $holdings_context_org, $bib_sort, $sort_dir, $group_member) = @_;
$holdings_context_org ||= $U->get_org_tree->id;