From 8ef0f5912365b656cd1f97a0e1795c62b1f3281f Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 13 Aug 2012 10:10:11 +0200 Subject: [PATCH] Bug 7167: Don't raise an error in routine TableExists Content-Type: text/plain; charset="utf-8" --- C4/Update/Database.pm | 9 ++++----- 1 file 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.9.5