diff --git a/core/lib/Drupal/Core/Database/Driver/sqlite/Connection.php b/core/lib/Drupal/Core/Database/Driver/sqlite/Connection.php index 48bfee8..b499b5a 100644 --- a/core/lib/Drupal/Core/Database/Driver/sqlite/Connection.php +++ b/core/lib/Drupal/Core/Database/Driver/sqlite/Connection.php @@ -342,7 +342,8 @@ protected function handleQueryException(\PDOException $e, $query, array $args = // (e.g. usually happens when running tests). In this case, we need to // re-run the query. // @see http://www.sqlite.org/faq.html#q15 - if (preg_match('/^SQLSTATE\[HY000\]: General error: 17 database schema has changed/', $e->getMessage())) { + // @see http://www.sqlite.org/rescode.html#schema + if (!empty($e->errorInfo[1]) && $e->errorInfo[1] === 17) { return $this->query($query, $args, $options); }