diff --git a/core/modules/system/src/SystemConfigSubscriber.php b/core/modules/system/src/SystemConfigSubscriber.php index 4248fb2e8f..480ce4b535 100644 --- a/core/modules/system/src/SystemConfigSubscriber.php +++ b/core/modules/system/src/SystemConfigSubscriber.php @@ -126,7 +126,6 @@ public function onConfigImporterValidateDatabaseUpdate(ConfigImporterEvent $even */ protected function hasModuleUpdates() { // Check installed modules. - $has_pending_updates = FALSE; foreach ($this->moduleHandler->getModuleList() as $module => $filename) { $updates = drupal_get_schema_versions($module); if ($updates !== FALSE) { @@ -136,14 +135,14 @@ protected function hasModuleUpdates() { } } } - if (!$has_pending_updates) { - $missing_post_update_functions = $this->postUpdateRegistry->getPendingUpdateFunctions(); - if (!empty($missing_post_update_functions)) { - return TRUE; - } + + // Check post update hooks. + $missing_post_update_functions = $this->postUpdateRegistry->getPendingUpdateFunctions(); + if (!empty($missing_post_update_functions)) { + return TRUE; } - return $has_pending_updates; + return FALSE; } /**