From 1c0c4d584da6f4d72e92295da76d36f8c667e629 Mon Sep 17 00:00:00 2001 From: schneidewindb <152987258+schneidewindb@users.noreply.github.com> Date: Wed, 16 Sep 2026 13:34:02 -0500 Subject: [PATCH] Fix undefined array key warnings in Freemius SDK This updates two locations where array values are accessed without checking whether the key exists. --- includes/class-freemius.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/class-freemius.php b/includes/class-freemius.php index 6fc8bd9a..b6a9165c 100755 --- a/includes/class-freemius.php +++ b/includes/class-freemius.php @@ -9990,7 +9990,7 @@ function get_plugin_data( $reparse_plugin_metadata = false ) { function get_slug() { if ( ! isset( $this->_slug ) ) { $id_slug_type_path_map = self::$_accounts->get_option( 'id_slug_type_path_map', array() ); - $this->_slug = $id_slug_type_path_map[ $this->_module_id ]['slug']; + $this->_slug = isset($id_slug_type_path_map[ $this->_module_id ]['slug']) ? $id_slug_type_path_map[ $this->_module_id ]['slug'] : null; } return $this->_slug; @@ -14944,7 +14944,7 @@ function is_plugin() { function get_module_type() { if ( ! isset( $this->_module_type ) ) { $id_slug_type_path_map = self::$_accounts->get_option( 'id_slug_type_path_map', array() ); - $this->_module_type = $id_slug_type_path_map[ $this->_module_id ]['type']; + $this->_module_type = isset($id_slug_type_path_map[ $this->_module_id ]['type']) ? $id_slug_type_path_map[ $this->_module_id ]['type'] : null; } return $this->_module_type;