Bug 6017 : MT3157 : editing an attribute lead to Error500

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

Signed-off-by: Stéphane Delaune <stephane.delaune@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
This commit is contained in:
Henri-Damien LAURENT 2011-04-06 16:51:00 +02:00 committed by Chris Cormack
parent d29fd92f66
commit e2fd348f7f

View file

@ -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{