Skip to content
Snippets Groups Projects
Verified Commit a64943de authored by Lee Rowlands's avatar Lee Rowlands
Browse files

Issue #2880387 by Kingdutch: Avoid unnecessary array operations in update_get_update_list

parent d3612415
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
...@@ -323,8 +323,7 @@ function update_get_update_list() { ...@@ -323,8 +323,7 @@ function update_get_update_list() {
continue; continue;
} }
$updates = array_combine($updates, $updates); foreach ($updates as $update) {
foreach (array_keys($updates) as $update) {
if ($update == \Drupal::CORE_MINIMUM_SCHEMA_VERSION) { if ($update == \Drupal::CORE_MINIMUM_SCHEMA_VERSION) {
$ret[$module]['warning'] = '<em>' . $module . '</em> module cannot be updated. It contains an update numbered as ' . \Drupal::CORE_MINIMUM_SCHEMA_VERSION . ' which is reserved for the earliest installation of a module in Drupal ' . \Drupal::CORE_COMPATIBILITY . ', before any updates. In order to update <em>' . $module . '</em> module, you will need to install a version of the module with valid updates.'; $ret[$module]['warning'] = '<em>' . $module . '</em> module cannot be updated. It contains an update numbered as ' . \Drupal::CORE_MINIMUM_SCHEMA_VERSION . ' which is reserved for the earliest installation of a module in Drupal ' . \Drupal::CORE_COMPATIBILITY . ', before any updates. In order to update <em>' . $module . '</em> module, you will need to install a version of the module with valid updates.';
continue 2; continue 2;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment