diff --git a/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php b/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php index 04af4f4..72460a2 100644 --- a/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php +++ b/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php @@ -325,11 +325,11 @@ public function preSave(EntityStorageInterface $storage) { // of whether it's new or updated. if ($uuid = $this->uuid()) { $matching_entities = $storage->getQuery() - ->condition('uuid', $this->uuid()) + ->condition('uuid', $uuid) ->execute(); $matched_entity = reset($matching_entities); if (!empty($matched_entity) && ($matched_entity != $this->id()) && $matched_entity != $this->getOriginalId()) { - throw new ConfigDuplicateUUIDException("Attempt to save a configuration entity '{$this->id()}' with UUID '{$this->uuid()}' when this UUID is already used for '$matched_entity'"); + throw new ConfigDuplicateUUIDException("Attempt to save a configuration entity '{$this->id()}' with UUID '$uuid' when this UUID is already used for '$matched_entity'"); } } diff --git a/core/lib/Drupal/Core/KeyValueStore/DatabaseStorage.php b/core/lib/Drupal/Core/KeyValueStore/DatabaseStorage.php index f862949..fe71c47 100644 --- a/core/lib/Drupal/Core/KeyValueStore/DatabaseStorage.php +++ b/core/lib/Drupal/Core/KeyValueStore/DatabaseStorage.php @@ -232,14 +232,13 @@ protected function ensureTableExists() { try { $database_schema = $this->connection->schema(); if (!$database_schema->tableExists($this->table)) { - $schema_definition = $this->schemaDefinition(); - $database_schema->createTable($this->table, $schema_definition); + $database_schema->createTable($this->table, $this->schemaDefinition()); return TRUE; } } - // If another process has already created the batch table, attempting to - // recreate it will throw an exception. In this case just catch the - // exception and do nothing. + // If another process has already created the batch table, attempting to + // recreate it will throw an exception. In this case just catch the + // exception and do nothing. catch (SchemaObjectExistsException $e) { return TRUE; } @@ -254,7 +253,7 @@ protected function ensureTableExists() { * yet the query failed, then the batch is stale and the exception needs * to propagate. * - * @param $e + * @param \Exception $e * The exception. * * @throws \Exception @@ -296,4 +295,5 @@ public function schemaDefinition() { 'primary key' => ['collection', 'name'], ]; } + } diff --git a/core/modules/system/src/Tests/Path/UrlAliasFixtures.php b/core/modules/system/src/Tests/Path/UrlAliasFixtures.php index b8b6ea1..5911241 100644 --- a/core/modules/system/src/Tests/Path/UrlAliasFixtures.php +++ b/core/modules/system/src/Tests/Path/UrlAliasFixtures.php @@ -2,7 +2,7 @@ namespace Drupal\system\Tests\Path; -use Drupal\Core\Config\DatabaseStorage; +use Drupal\Core\KeyValueStore\DatabaseStorage; use Drupal\Core\Database\Connection; use Drupal\Core\Path\AliasStorage; diff --git a/core/modules/system/src/Tests/Update/DbDumpTest.php b/core/modules/system/src/Tests/Update/DbDumpTest.php index af6ad2f..0f7685a 100644 --- a/core/modules/system/src/Tests/Update/DbDumpTest.php +++ b/core/modules/system/src/Tests/Update/DbDumpTest.php @@ -83,9 +83,7 @@ protected function setUp() { $this->skipTests = Database::getConnection()->databaseType() !== 'mysql'; // Create some schemas so our export contains tables. - $this->installSchema('system', [ - 'sessions', - ]); + $this->installSchema('system', ['sessions']); $this->installSchema('dblog', ['watchdog']); $this->installEntitySchema('block_content'); $this->installEntitySchema('user'); diff --git a/core/modules/system/tests/fixtures/HtaccessTest/access_test.module.orig b/core/modules/system/tests/fixtures/HtaccessTest/access_test.module.orig new file mode 100644 index 0000000..e69de29 diff --git a/core/modules/system/tests/fixtures/HtaccessTest/access_test.php.orig b/core/modules/system/tests/fixtures/HtaccessTest/access_test.php.orig new file mode 100644 index 0000000..e69de29