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 #129

Open
kevstev01 opened this issue Mar 9, 2022 · 3 comments
Open

is_plugin_active #129

kevstev01 opened this issue Mar 9, 2022 · 3 comments

Comments

@kevstev01
Copy link

I've installed the wordpress-saml plugin (Word Press Version 5.9.1, PHP 7.4) and I'm seeing an error 'function not found : is_plugin_active' when I use the /wp-login.php?normal option (SAML wasn't configured correctly, so I was trying to get to a standard wordpress login).

I fudged the PHP code in saml_custom_login_footer() to get past the error by using :

if (1 || is_plugin_active('wps-hide-login/wps-hide-login.php')) {
	$login_page = str_replace( 'wp-login.php', get_site_option( 'whl_page', 'login' ), $login_page ) . '/';
}

but not being fluent in wordpress development, there's probably a better way...

@Tea23
Copy link

Tea23 commented Apr 27, 2022

Can confirm the issue in Wordpress 5.9.3, the above fix worked for me to get around it in two of my sites. But yeah - I'm also not fluent in Wordpress (or PHP) so it would be good to have a solid upstream fix.

@gthayer
Copy link

gthayer commented May 9, 2022

^ Submitted a patch for handling this.

@michael-sumner
Copy link

I've filed a similar PR to address where the function does not need to exist and instead relies on the active_plugins option:

This fixes the issue with:

PHP message: PHP Fatal error:  Uncaught Error: Call to undefined function is_plugin_active() in /code/wp-content/plugins/onelogin-saml-sso/php/functions.php:108

Hope this helps!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants