]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 391073: process_bug.cgi throws an error if a bug is moved to another product...
authorlpsolit%gmail.com <>
Wed, 8 Aug 2007 02:49:34 +0000 (02:49 +0000)
committerlpsolit%gmail.com <>
Wed, 8 Aug 2007 02:49:34 +0000 (02:49 +0000)
Bugzilla/Error.pm

index d9f6e70b3ddd9fc46efb3aa750d5077157cf42ea..d5b8a3479224f89c2606d450fb9250da3dcb5555 100644 (file)
@@ -41,7 +41,9 @@ sub _throw_error {
 
     # Make sure any locked tables are unlocked
     # and the transaction is rolled back (if supported)
-    Bugzilla->dbh->bz_unlock_tables(UNLOCK_ABORT);
+    # If we are within an eval(), do not unlock tables as we are
+    # eval'uating some test on purpose.
+    Bugzilla->dbh->bz_unlock_tables(UNLOCK_ABORT) unless $^S;
 
     my $datadir = bz_locations()->{'datadir'};
     # If a writable $datadir/errorlog exists, log error details there.