Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The documentation for hook_modules_uninstalled lists the $modules parameter as a string ("The name of the uninstalled module."). This is incorrect, the $modules parameter is an array.
Comment | File | Size | Author |
---|---|---|---|
#3 | system.api_.modules-parameter-712364-3.patch | 429 bytes | djac |
Comments
Comment #1
jhodgdonGood point!
Comment #2
djac CreditAttribution: djac commentedComment #3
djac CreditAttribution: djac commentedUpdated hook_modules_uninstalled() documentation to specify that $modules is an array.
Comment #4
jhodgdonLooks quite reasonable to me. Thanks!
The only thing I would say for next time is that if a parameter is an array, we are encouraging
i.e. putting the data type before the parameter name. But as this is not exactly a doc *requirement* now...
Comment #5
djac CreditAttribution: djac commentedI tried to use similar syntax/wording as hook_modules_installed(), but I will keep your suggestion in mind for next time, as I agree with you 100%!
Comment #6
jhodgdonIt's a new standard, and not many functions are using it.
Comment #7
Dries CreditAttribution: Dries commentedGood catch. Committed to CVS HEAD.