From fd3aef2a44c78fd7f8148c8c04f0e2833cafa5cb Mon Sep 17 00:00:00 2001 From: Robert O'Rourke Date: Wed, 17 May 2023 11:30:09 +0000 Subject: [PATCH] Fix config key check for force enabling PHP Basic Auth The config key being checked was incorrect, so even with setting `php-basic-auth` to `true` in your config it wouldn't load the plugin as documented. --- inc/php_basic_auth/namespace.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/php_basic_auth/namespace.php b/inc/php_basic_auth/namespace.php index eb4d92f..2e690e8 100644 --- a/inc/php_basic_auth/namespace.php +++ b/inc/php_basic_auth/namespace.php @@ -50,7 +50,7 @@ function define_credentials() { */ function force_enable( $should_enable ) { $environment = Altis\get_environment_type(); - $env_config = Altis\get_config()['environments'][ $environment ]['modules']['security']['basic-auth'] ?? []; + $env_config = Altis\get_config()['environments'][ $environment ]['modules']['security']['php-basic-auth'] ?? []; // If there's no config, use the existing values. if ( empty( $env_config ) || ! is_array( $env_config ) ) {