From d1b6c4374463c512c5730ba659d23cbe692f5b8a Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 13 Aug 2012 10:10:11 +0200 Subject: [PATCH 1/1] Bug 7167: Don't raise an error in routine TableExists --- C4/Update/Database.pm | 9 ++++----- 1 files changed, 4 insertions(+), 5 deletions(-) diff --git a/C4/Update/Database.pm b/C4/Update/Database.pm index 78c5fb3..41f0ee3 100644 --- a/C4/Update/Database.pm +++ b/C4/Update/Database.pm @@ -537,12 +537,11 @@ sub SetVersion { sub TableExists { my $table = shift; eval { - local $dbh->{PrintError} = 0; - local $dbh->{RaiseError} = 1; - $dbh->do(qq{SELECT * FROM $table WHERE 1 = 0 }); - }; + local $dbh->{PrintError} = 0; + local $dbh->{RaiseError} = 0; + $dbh->do(qq{SELECT * FROM $table WHERE 1 = 0 }); + }; return 1 unless $@; return 0; } - 1; -- 1.7.7.3