[Koha-patches] [PATCH] Bug 8180 - cataloguing/additem.pl plack scoping

Dobrica Pavlinusic dpavlin at rot13.org
Fri Jun 1 16:40:13 CEST 2012


$dbh needs our scoping when using "Add item" to prevent error
Can't call method "prepare" on an undefined value at /srv/koha/cataloguing/additem.pl line 88.

Test scenario:

1. start intranet with plack
2. select one Edit items on one record
3. fill in new item and click on "Add item"
---
 cataloguing/additem.pl |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/cataloguing/additem.pl b/cataloguing/additem.pl
index f970890..deb0208 100755
--- a/cataloguing/additem.pl
+++ b/cataloguing/additem.pl
@@ -37,7 +37,7 @@ use C4::Search;
 use MARC::File::XML;
 use URI::Escape;
 
-my $dbh = C4::Context->dbh;
+our $dbh = C4::Context->dbh;
 
 sub find_value {
     my ($tagfield,$insubfield,$record) = @_;
-- 
1.7.2.5



More information about the Koha-patches mailing list