Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

is_plugin_active is unreliable #385

Open
jdevalk opened this issue Dec 7, 2023 · 0 comments
Open

is_plugin_active is unreliable #385

jdevalk opened this issue Dec 7, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@jdevalk
Copy link
Collaborator

jdevalk commented Dec 7, 2023

Using is_plugin_active() (or the completely unnecessary edac_check_plugin_active function) is completely unreliable. Some people rename the plugin folders, others use symlinks, etc. Instead of using is_plugin_active() we should check if a plugin is active using other methods. Most plugins define constants, classes or functions that rarely (if ever) change name. Using defined(), class_exists() or function_exists() is a lot more reliable than is_plugin_active().

@jdevalk jdevalk added the bug Something isn't working label Dec 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant