diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-01-11 00:13:01 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-01-11 00:13:01 +0000 |
commit | 1e7d70a44ca25c86e5546dd1045feb64482bd6e1 (patch) | |
tree | 5d40503564832346655db315c25a86fe3bc8931f /modules/comment/comment.install | |
parent | 0d2db0ee3cef60d1a3e79c7dc8162e97a66d43c7 (diff) | |
download | brdo-1e7d70a44ca25c86e5546dd1045feb64482bd6e1.tar.gz brdo-1e7d70a44ca25c86e5546dd1045feb64482bd6e1.tar.bz2 |
#538164 follow-up by yched: Fix notice in update.php.
Diffstat (limited to 'modules/comment/comment.install')
-rw-r--r-- | modules/comment/comment.install | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/comment/comment.install b/modules/comment/comment.install index b2106da20..b6579e751 100644 --- a/modules/comment/comment.install +++ b/modules/comment/comment.install @@ -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']; } /** |