Enabling this module gives me an error on the Administration > Configuration page:
Warning: strcmp() expects parameter 2 to be string, array given in _system_sort_requirements() (line 2796 of /modules/system/system.module).
Warning: strcmp() expects parameter 1 to be string, array given in _system_sort_requirements() (line 2796 of /modules/system/system.module).
Warning: usort() [function.usort]: Array was modified by the user comparison function in system_status() (line 2289 of /modules/system/system.admin.inc).
Disabling the module makes it go away. FYI, I'm running Drupal with MAMP on Mac OS 10.7, PHP 5.3.
Comments
Comment #1
arne.skaanes@acm.org commentedI get this message several places after module update and/or manually running cron.
Error disappears after I clear cache.
Comment #2
ZenDoodles commentedHm... it seems this is related to hook_requirements. It *should* go away after the initial warning and a cache clear, but let's make sure the new hook_requirements() implementation is not broken.
Comment #3
arne.skaanes@acm.org commentedThe same error message reappeared after some days, but this time it did not disappear after a cache reset.
My customer is getting worried!
Comment #4
ZenDoodles commentedI have a site reporting this error on the status report page as well. It is harmless, but I understand how clients can be. As a temporary fix, you can comment the function twitter_block_requirements() in twitter_block.install to make these errors go away.
Otherwise, we'll have a fix for you soon.
Note: hook_requirements *looks* correct to me. I'm going to have to look at the api docs again to see what I'm missing.
Comment #5
mauhg commentedFor some reason, i think some other module implements a requirements with the same name, cURL.
So i change that name and the warnings message disappear, i made a patch and tested in my localhost.
The simpletest module has the same hook_requirements, and have the same $requirements['curl'].
Comment #6
arne.skaanes@acm.org commentedI upgraded to Drupal 7.14 and now the messages has disappeared :-)
Comment #7
devin carlson commentedMarked #1621734: Requirements clash with core module SimpleTest as a duplicate.
Comment #8
devin carlson commentedThe patch in #5 solves the issue.
I've attached an updated patch that simply uses the module's name at the beginning of the array key instead of at the end.
Comment #9
alan d. commented@ZenDoodles Why there is an error here.
SimpleTest defines the hook_requirement 'curl' and Drupal can not handle duplicate array keys returned by module_invoke_all(). Simple as that. There is nothing wrong, it is just a clash with another module :)
Comment #10
alan d. commentedWhile bad form to mark our own patches as "reviewed & tested by the community", I would have done that myself!
Comment #11
ZenDoodles commentedThank you for the patch. Committed to dev. Will be pushing and tagging along with a couple of other issues soon.