From 5cae8e654e7db067135155d5569dc293a912ed76 Mon Sep 17 00:00:00 2001 From: David Parker Date: Tue, 17 Dec 2024 14:01:26 -0500 Subject: [PATCH] Making sure that array key exists --- .../elementor/class-pmpro-elementor-content-restriction.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/compatibility/elementor/class-pmpro-elementor-content-restriction.php b/includes/compatibility/elementor/class-pmpro-elementor-content-restriction.php index eeff5ea8c9..40832c2abf 100644 --- a/includes/compatibility/elementor/class-pmpro-elementor-content-restriction.php +++ b/includes/compatibility/elementor/class-pmpro-elementor-content-restriction.php @@ -119,7 +119,7 @@ public function pmpro_elementor_has_access( $element ) { $element_settings = $element->get_active_settings(); - $restricted_levels = $element_settings['pmpro_require_membership']; + $restricted_levels = empty( $element_settings['pmpro_require_membership'] ) ? array() : $element_settings['pmpro_require_membership']; // Just bail if the content isn't restricted at all. if ( ! $restricted_levels ) {