Fixes #1567444 - Wrong exception (PDOException) was in a catch statement instead of DatabaseException - thanks for aspilicious's help

8.0.x
Pierre Rineau 2012-05-08 20:31:28 +02:00
parent 12e53f92a3
commit 1bcdb02891
1 changed files with 2 additions and 2 deletions

View File

@ -7,7 +7,7 @@
namespace Drupal\Core\Lock; namespace Drupal\Core\Lock;
use PDOException; use Drupal\Core\Database\DatabaseException;
/** /**
* Defines the database lock backend. This is the default backend in Drupal. * Defines the database lock backend. This is the default backend in Drupal.
@ -53,7 +53,7 @@ class DatabaseLockBackend extends LockBackendAbstract {
// We never need to try again. // We never need to try again.
$retry = FALSE; $retry = FALSE;
} }
catch (PDOException $e) { catch (DatabaseException $e) {
// Suppress the error. If this is our first pass through the loop, // Suppress the error. If this is our first pass through the loop,
// then $retry is FALSE. In this case, the insert must have failed // then $retry is FALSE. In this case, the insert must have failed
// meaning some other request acquired the lock but did not release it. // meaning some other request acquired the lock but did not release it.