Make module_hook() check for module_exists() first

Created on 26 November 2012, about 12 years ago
Updated 3 August 2023, over 1 year ago

Spin-off from #1850352: config_import_invoke_owner() should check whether a module exists before invoking its hooks β†’

Problem

  • Unlike all other module_* functions, module_hook() is based on a pure function_exists() only, which can easily trigger false-positives, depending on what PHP code has been loaded.

Proposed solution

  1. Simply add a module_exists() check before returning anything.
πŸ“Œ Task
Status

Postponed: needs info

Version

9.5

Component
BaseΒ  β†’

Last updated 18 minutes ago

Created by

πŸ‡©πŸ‡ͺGermany sun Karlsruhe

Live updates comments and jobs are added and updated live.
  • API clean-up

    Refactors an existing API or subsystem for consistency, performance, modularization, flexibility, third-party integration, etc. May imply an API change. Frequently used during the Code Slush phase of the release cycle.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024