[Koha] software error message - authorities
Colin Campbell
colin.campbell at ptfs-europe.com
Fri Mar 11 04:02:59 NZDT 2011
On 08/03/11 14:26, Elaine Bradtke wrote:
> I tried to delete an authority record with 0 biblios and got the
> following message:
> Undefined subroutine &C4::AuthoritiesMarc::prepare called at
> /usr/share/koha/lib/C4/AuthoritiesMarc.pm line 720.
>
> We're running 3.2.5.
> I can't seem to delete any authorities at the moment.
> Any idea what this means, or how we can fix it?
>
If you look at this line you'll see DelAuthority is calling a
non-existent prepare subroutine it should be calling dbh's prepare method.
There's a recent patch that fixes this bug:
> commit 18faba5e06d2696bd4e99175b1c2208a8512f9d9
> Author: Marcel de Rooy <M.de.Rooy at rijksmuseum.nl>
> Date: Mon Feb 28 08:30:07 2011 +0000
>
> Bug 1953 - Follow up fix on security patch
>
> Fixing: Undefined subroutine prepare called on line 722.
>
> Signed-off-by: Chris Cormack <chrisc at catalyst.net.nz>
> (cherry picked from commit 439d2224e1215fa876ff7c5a06f773003555a035)
>
> Signed-off-by: Chris Nighswonger <chris.nighswonger at gmail.com>
>
> diff --git a/C4/AuthoritiesMarc.pm b/C4/AuthoritiesMarc.pm
> index 2e10762..6cbe373 100644
> --- a/C4/AuthoritiesMarc.pm
> +++ b/C4/AuthoritiesMarc.pm
> @@ -717,7 +717,7 @@ sub DelAuthority {
> my $dbh=C4::Context->dbh;
>
> ModZebra($authid,"recordDelete","authorityserver",GetAuthority($authid),undef);
> - my $sth = prepare("DELETE FROM auth_header WHERE authid=?");
> + my $sth = $dbh->prepare("DELETE FROM auth_header WHERE authid=?");
> $sth->execute($authid);
> }
--
Colin Campbell
Chief Software Engineer,
PTFS Europe Limited
Content Management and Library Solutions
+44 (0) 845 557 5634 (phone)
+44 (0) 7759 633626 (mobile)
colin.campbell at ptfs-europe.com
skype: colin_campbell2
http://www.ptfs-europe.com
More information about the Koha
mailing list