Skip to content
Snippets Groups Projects
Commit 1e7d70a4 authored by Angie Byron's avatar Angie Byron
Browse files

#538164 follow-up by yched: Fix notice in update.php.

parent 0d2db0ee
Branches
Tags
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
......@@ -287,6 +287,7 @@ function comment_update_7013(&$sandbox) {
}
$sandbox['total'] = count($sandbox['types']);
}
if (!empty($sandbox['types'])) {
$type = array_shift($sandbox['types']);
......@@ -307,6 +308,8 @@ function comment_update_7013(&$sandbox) {
db_insert($comment_body_table)
->from($query)
->execute();
$sandbox['#finished'] = 1 - count($sandbox['types']) / $sandbox['total'];
}
// On the last pass of the update, $sandbox['types'] will be empty.
......@@ -314,8 +317,6 @@ function comment_update_7013(&$sandbox) {
db_drop_field('comment', 'comment');
db_drop_field('comment', 'format');
}
$sandbox['#finished'] = 1 - count($sandbox['types']) / $sandbox['total'];
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment