[Koha-patches] [PATCH] Bug 6017 : MT3157 : editing an attribute lead to Error500

Chris Cormack chrisc at catalyst.net.nz
Thu Mar 31 04:03:14 CEST 2011


From: Henri-Damien LAURENT <henridamien.laurent at biblibre.com>

Editing an extended attribute in the extended attribute tab would lead to an Error500
This patch adds some checks for values before UPDATE in SQLHelper.pm
And Adds some checks also befaore calling ModMember in members/memberentry
---
 C4/SQLHelper.pm |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/C4/SQLHelper.pm b/C4/SQLHelper.pm
index 060b78f..a15beb8 100644
--- a/C4/SQLHelper.pm
+++ b/C4/SQLHelper.pm
@@ -164,6 +164,7 @@ sub UpdateInTable{
     my @ids=@$data{@field_ids};
     my $dbh      = C4::Context->dbh;
     my ($keys,$values)=_filter_hash($tablename,$data,0);
+    return unless ($keys);
     my $query = 
     qq{     UPDATE $tablename
             SET  }.join(",",@$keys).qq{
-- 
1.7.1



More information about the Koha-patches mailing list