When simpletest module is enabled and php-curl is not installed, along with the curl error there's a PHP warning:

    *  Simpletest could not be installed because the PHP cURL library is not available. (Currently using cURL Not found)
    * Warning: array_multisort(): Array sizes are inconsistent in system_modules_submit() (line 1141 of /home/ogi/public_html/drupal-7.x-dev/modules/system/system.admin.inc).

The relevant code is:

    $sort = array();
    foreach ($new_modules as $key => $module) {
      if (!drupal_check_module($module)) {
        unset($new_modules[$key]);
      }
      $sort[$module] = $files[$module]->sort;
    }
    array_multisort($sort, $new_modules);

So when module is removed from $new_modules, it's still added to $sort. The patch solves this straightforwardly.

CommentFileSizeAuthor
system7-multisort.diff548 bytesogi

Comments

Status: Needs review » Needs work

The last submitted patch failed testing.

sivaji_ganesh_jojodae’s picture

jbrown’s picture