Bugzilla – Attachment 25519 Details for
Bug 11803
Consistent use of $dbh in _koha_modify_item
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 11803: Consistent use of $dbh in _koha_modify_item
Bug-11803-Consistent-use-of-dbh-in-kohamodifyitem.patch (text/plain), 1.14 KB, created by
Marcel de Rooy
on 2014-02-20 18:51:08 UTC
(
hide
)
Description:
Bug 11803: Consistent use of $dbh in _koha_modify_item
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2014-02-20 18:51:08 UTC
Size:
1.14 KB
patch
obsolete
>From 8e58d1fd1e008351b7ab070d9ed3b9f99ac26ecc Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Thu, 20 Feb 2014 19:39:10 +0100 >Subject: [PATCH] Bug 11803: Consistent use of $dbh in _koha_modify_item >Content-Type: text/plain; charset=utf-8 > >This is just some code cleanup, no behavior change expected. >Also replacing errstr with err in testing the results. (See DBI.) > >Test plan: >Modify an item and save it. >--- > C4/Items.pm | 6 +++--- > 1 files changed, 3 insertions(+), 3 deletions(-) > >diff --git a/C4/Items.pm b/C4/Items.pm >index 5680db7..12dce85 100644 >--- a/C4/Items.pm >+++ b/C4/Items.pm >@@ -2316,10 +2316,10 @@ sub _koha_modify_item { > $query =~ s/,$//; > $query .= " WHERE itemnumber=?"; > push @bind, $item->{'itemnumber'}; >- my $sth = C4::Context->dbh->prepare($query); >+ my $sth = $dbh->prepare($query); > $sth->execute(@bind); >- if ( C4::Context->dbh->errstr ) { >- $error.="ERROR in _koha_modify_item $query".$dbh->errstr; >+ if ( $sth->err ) { >+ $error.="ERROR in _koha_modify_item $query: ".$sth->errstr; > warn $error; > } > return ($item->{'itemnumber'},$error); >-- >1.7.7.6
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 11803
:
25519
|
25561
|
25576