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.
Using drupal_get_installed_schema_version() generates an undefined index error when the module being checked does not exist. It would make more sense to return FALSE in that case.
Patch to follow.
Comment | File | Size | Author |
---|---|---|---|
#2 | 440842-drupal-get-installed-schema-version-D7.patch | 3.33 KB | Dave Reid |
#1 | install.inc-440842-1.patch | 988 bytes | Darren Oh |
Comments
Comment #1
Darren OhPatch attached
Comment #2
Dave ReidWe should probably just make that whole function smarter. :) How about this?
Comment #3
Darren OhGood idea. Since its an API change, we should use the first patch to fix Drupal 6.
Comment #4
Dries CreditAttribution: Dries commentedPlease don't remove the reset parameter from that function. Only tests should call drupal_static_reset().
Comment #5
Dave ReidI thought we were removing $reset parameters because of the new static API... This is what all the static conversion patches are doing. :/
Comment #6
Darren OhPatch in #1 still needs review.
Comment #8
Anonymous (not verified) CreditAttribution: Anonymous commentedTested with
drupal_get_installed_schema_version('foo');
This is no longer an issue.Comment #9
Darren Oh