diff --git a/core/modules/system/system.install b/core/modules/system/system.install index 1eac18520d..ef9b944e43 100644 --- a/core/modules/system/system.install +++ b/core/modules/system/system.install @@ -1952,6 +1952,7 @@ function system_update_8401(&$sandbox) { if (empty($definitions)) { $sandbox['#finished'] = TRUE; + return; } $sandbox['entity_type_ids'] = array_keys($definitions); @@ -1999,5 +2000,5 @@ function system_update_8401(&$sandbox) { $sandbox['current_key']++; } - $sandbox['#finished'] = $sandbox['current'] == $sandbox['max']; + $sandbox['#finished'] = $sandbox['current_key'] == $sandbox['max']; }