| @@ -235,11 +235,14 @@ | ||
| 235 | 235 | * |
| 236 | 236 | * @return array Returns an array of configuration strings. |
| 237 | 237 | */ |
| 238 | 238 | public function config_strings( array $config ): array { |
| 239 | - $active = ! empty( $config['sh_xframe'] ) || ! empty( $config['sh_xss_protection'] ) | |
| 240 | - || ! empty( $config['sh_content_type_options'] ) || ! empty( $config['sh_feature_policy'] ) | |
| 241 | - || ! empty( $config['sh_strict_transport'] ) || ! empty( $config['sh_referrer_policy'] ); | |
| 239 | + $active = ( isset( $config['sh_xframe'] ) && $config['sh_xframe'] ) | |
| 240 | + || ( isset( $config['sh_xss_protection'] ) && $config['sh_xss_protection'] ) | |
| 241 | + || ( isset( $config['sh_content_type_options'] ) && $config['sh_content_type_options'] ) | |
| 242 | + || ( isset( $config['sh_feature_policy'] ) && $config['sh_feature_policy'] ) | |
| 243 | + || ( isset( $config['sh_strict_transport'] ) && $config['sh_strict_transport'] ) | |
| 244 | + || ( isset( $config['sh_referrer_policy'] ) && $config['sh_referrer_policy'] ); | |
| 242 | 245 | |
| 243 | 246 | return array( |
| 244 | 247 | \WP_Defender\Model\Setting\Security_Headers::get_module_name() . ' ' |
| 245 | 248 | . ( $active ? esc_html__( 'active', 'defender-security' ) : esc_html__( 'inactive', 'defender-security' ) ), |