From 40ce3d23e6d8b2065f46b25861b1574144264288 Mon Sep 17 00:00:00 2001 From: Mike Little Date: Thu, 28 Sep 2023 11:27:24 +0100 Subject: [PATCH] Don't assume analytics module is configured --- inc/gtm/namespace.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/inc/gtm/namespace.php b/inc/gtm/namespace.php index 54f87d4..4fd9a56 100644 --- a/inc/gtm/namespace.php +++ b/inc/gtm/namespace.php @@ -13,7 +13,8 @@ * Kick it off. */ function bootstrap() { - $gtm = Altis\get_config()['modules']['analytics']['google-tag-manager']; + $config = Altis\get_config(); + $gtm = $config['modules']['analytics']['google-tag-manager'] ?? ''; // Bail if we aren't using GTM. if ( empty( $gtm ) ) {