diff --git a/includes/install.inc b/includes/install.inc index 472cc94077f882406f19f16b1e9951123219d634..c62039091e3fd4a7c9d87a0ae81187d12c39d180 100644 --- a/includes/install.inc +++ b/includes/install.inc @@ -29,8 +29,11 @@ function drupal_get_schema_versions($module) { $functions = get_defined_functions(); foreach ($functions['user'] as $function) { - if (strpos($function, $module .'_update') === 0) { - $updates[] = (int) substr($function, strlen($module .'_update_')); + if (strpos($function, $module .'_update_') === 0) { + $version = substr($function, strlen($module .'_update_')); + if (is_numeric($version)) { + $updates[] = $version; + } } } if (count($updates) == 0) { diff --git a/update.php b/update.php index 9b16492baf2e99aeb03efd7d13d22c50cffe0ddf..14c19e4d0681f5e741aa91d476d9d1fb91ae02e6 100644 --- a/update.php +++ b/update.php @@ -292,8 +292,9 @@ function update_selection_page() { '#collapsed' => TRUE, ); foreach (module_list() as $module) { - if (module_hook($module, 'version')) { - $updates = drupal_map_assoc(drupal_get_schema_versions($module)); + $updates = drupal_get_schema_versions($module); + if ($updates !== FALSE) { + $updates = drupal_map_assoc($updates); $updates[] = 'No updates available'; $form['start'][$module] = array(