diff --git a/core/modules/update/src/UpdateProcessor.php b/core/modules/update/src/UpdateProcessor.php index 1e2cfb7432..fe23040f8b 100644 --- a/core/modules/update/src/UpdateProcessor.php +++ b/core/modules/update/src/UpdateProcessor.php @@ -115,7 +115,7 @@ public function createFetchTask($project) { if (empty($this->fetchTasks)) { $this->fetchTasks = $this->fetchTaskStore->getAll(); } - if (empty($this->fetchTasks[$project['name']])) { + if (empty($this->fetchTasks[$project['name']]) || $this->fetchTasks[$project['name']] !== $project) { $this->fetchQueue->createItem($project); $this->fetchTaskStore->set($project['name'], $project); $this->fetchTasks[$project['name']] = REQUEST_TIME; diff --git a/core/modules/update/tests/src/Functional/UpdateSemverCoreTest.php b/core/modules/update/tests/src/Functional/UpdateSemverCoreTest.php index d0708ffca8..491ea131a6 100644 --- a/core/modules/update/tests/src/Functional/UpdateSemverCoreTest.php +++ b/core/modules/update/tests/src/Functional/UpdateSemverCoreTest.php @@ -427,12 +427,12 @@ public function testFetchTasks() { $this->assertEquals(2, $queue->numberOfItems(), 'Queue contains two items'); // Try to add a project again. update_create_fetch_task($projecta); - $this->assertEquals(2, $queue->numberOfItems(), 'Queue still contains two items'); + $this->assertEquals(3, $queue->numberOfItems(), 'Queue still contains three items'); // Clear storage and try again. update_storage_clear(); update_create_fetch_task($projecta); - $this->assertEquals(2, $queue->numberOfItems(), 'Queue contains two items'); + $this->assertEquals(4, $queue->numberOfItems(), 'Queue contains four items'); } /**