function update_check_incompatibility

8.0.x update_check_incompatibility($name, $type = 'module')
6.x update_check_incompatibility($name, $type = 'module')
7.x update_check_incompatibility($name, $type = 'module')
3.x update_check_incompatibility($name, $type = 'module')
4.x update_check_incompatibility($name, $type = 'module')
5.x update_check_incompatibility($name, $type = 'module')

Helper function to test compatibility of a module or theme.

2 calls to update_check_incompatibility()
update_fix_compatibility in commands/core/drupal/
Disable anything in the {system} table that is not compatible with the current version of Drupal core.
update_main in commands/core/drupal/


commands/core/drupal/, line 146
Update.php for provisioned sites. This file is a derivative of the standard drupal update.php, which has been modified to allow being run from the command line.


function update_check_incompatibility($name, $type = 'module') {
  static $themes, $modules;

  // Store values of expensive functions for future use.
  if (empty($themes) || empty($modules)) {
    drush_include_engine('drupal', 'environment');
    $themes = _system_theme_data();
    $modules = module_rebuild_cache();

  if ($type == 'module' && isset($modules[$name])) {
    $file = $modules[$name];
  else if ($type == 'theme' && isset($themes[$name])) {
    $file = $themes[$name];
  if (!isset($file) || !isset($file->info['core']) || $file->info['core'] != DRUPAL_CORE_COMPATIBILITY || version_compare(phpversion(), $file->info['php']) < 0) {
    return TRUE;
  return FALSE;