Skip to content

Commit

Permalink
Merge pull request #112 from humanmade/fix-warning-re-analytics-module
Browse files Browse the repository at this point in the history
Don't assume analytics module is configured
  • Loading branch information
mikelittle authored Sep 28, 2023
2 parents 4907c48 + 40ce3d2 commit 3f831d3
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 3f831d3

Please sign in to comment.