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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Darren Oh’s picture

Status: Active » Needs review
FileSize
988 bytes

Patch attached

Dave Reid’s picture

We should probably just make that whole function smarter. :) How about this?

Darren Oh’s picture

Status: Needs review » Reviewed & tested by the community

Good idea. Since its an API change, we should use the first patch to fix Drupal 6.

Dries’s picture

Status: Reviewed & tested by the community » Needs work

Please don't remove the reset parameter from that function. Only tests should call drupal_static_reset().

Dave Reid’s picture

I thought we were removing $reset parameters because of the new static API... This is what all the static conversion patches are doing. :/

Darren Oh’s picture

Status: Needs work » Needs review

Patch in #1 still needs review.

Status: Needs review » Needs work

The last submitted patch failed testing.

Anonymous’s picture

Version: 7.x-dev » 8.x-dev
Status: Needs work » Closed (cannot reproduce)

Tested with drupal_get_installed_schema_version('foo'); This is no longer an issue.

Darren Oh’s picture

Version: 8.x-dev » 6.x-dev
Status: Closed (cannot reproduce) » Needs review

Status: Needs review » Closed (outdated)

Automatically closed because Drupal 6 is no longer supported. If the issue verifiably applies to later versions, please reopen with details and update the version.