From 1e7d70a44ca25c86e5546dd1045feb64482bd6e1 Mon Sep 17 00:00:00 2001 From: Angie Byron Date: Mon, 11 Jan 2010 00:13:01 +0000 Subject: #538164 follow-up by yched: Fix notice in update.php. --- modules/comment/comment.install | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'modules') 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']; } /** -- cgit v1.2.3