Skip to content

Commit

Permalink
Don't assume analytics module is configured
Browse files Browse the repository at this point in the history
  • Loading branch information
mikelittle committed Sep 28, 2023
1 parent 4907c48 commit 40ce3d2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion inc/gtm/namespace.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) ) {
Expand Down

0 comments on commit 40ce3d2

Please sign in to comment.