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.
| Comment | File | Size | Author |
|---|---|---|---|
| system7-multisort.diff | 548 bytes | ogi |
Comments
Comment #2
sivaji_ganesh_jojodae commented#660852: PHP warning generated if module fails hook_requirements() during enable has a working patch for this bug.
Comment #3
jbrown commented#523208: array_multisort PHP warning when module failed to install