Title: Fatal error triggered in WordPress Admin
Last modified: January 23, 2025

---

# Fatal error triggered in WordPress Admin

 *  Resolved [Scott Bowler](https://wordpress.org/support/users/scottybowl2/)
 * (@scottybowl2)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/fatal-error-triggered-in-wordpress-admin/)
 * Hi guys,
 * We’re using The Events Calendar plugin, and one of the URLs called looks like
   this:
 *     ```wp-block-code
       /wp-admin/admin.php?page=tec-tickets-attendees&dialog=move_tickets&check=c2a77bc1c4&ticket_ids=111111&width=800&height=800&event_id=114506&
       ```
   
 * Visiting this page triggers a Fatal Error in your plugin
 *     ```wp-block-code
       PHP Fatal error: Uncaught TypeError: TLA_Media\GTM_Kit\Admin\SetupWizard::enqueue_assets(): Argument #1 ($hook) must be of type string, null given, called in /var/web/site/public_html/wp-includes/class-wp-hook.php on line 324 and defined in /var/web/site/public_html/wp-content/plugins/gtm-kit/src/Admin/SetupWizard.php:121
       ```
   
 * It looks like the function **enqueue_assets** in **wp-content/plugins/gtm-kit/
   src/Admin/SetupWizard.php** isn’t checking whether the **$hook** is set or not.
   
   Please can you add a fix which checks if the $hook is set or not
 *     ```wp-block-code
       	public function enqueue_assets( ?string $hook ): void {		if ( empty($hook) || strpos( $hook, self::SLUG ) === false ) {			return;		}
       ```
   

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Plugin Author [Torben Lundsgaard](https://wordpress.org/support/users/torbenlundsgaard/)
 * (@torbenlundsgaard)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/fatal-error-triggered-in-wordpress-admin/#post-18260774)
 * Can you please confirm that [https://wordpress.org/plugins/the-events-calendar/](https://wordpress.org/plugins/the-events-calendar/)
   is the plugin you are refering to?
 *  Thread Starter [Scott Bowler](https://wordpress.org/support/users/scottybowl2/)
 * (@scottybowl2)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/fatal-error-triggered-in-wordpress-admin/#post-18260824)
 * Thanks for the speedy reply! That’s correct, but the problem also impacts other
   plugins such as the “Duplicate Post” plugin. When you attempt to duplicate the
   post, a fatal error gets thrown.
 *  Plugin Author [Torben Lundsgaard](https://wordpress.org/support/users/torbenlundsgaard/)
 * (@torbenlundsgaard)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/fatal-error-triggered-in-wordpress-admin/#post-18260899)
 * Please go to ‘GTM Kit > Help > Support > Share system data with the GTM Kit support
   team’ and enter the support ticket: FS856-F2213
 *  Plugin Author [Torben Lundsgaard](https://wordpress.org/support/users/torbenlundsgaard/)
 * (@torbenlundsgaard)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/fatal-error-triggered-in-wordpress-admin/#post-18261007)
 * The fix is now merged and will be included in a release next week: [https://github.com/tlamedia/gtm-kit/pull/614](https://github.com/tlamedia/gtm-kit/pull/614)
 *  Thread Starter [Scott Bowler](https://wordpress.org/support/users/scottybowl2/)
 * (@scottybowl2)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/fatal-error-triggered-in-wordpress-admin/#post-18261015)
 * Wow, awesome, thank you!
 *  Plugin Author [Torben Lundsgaard](https://wordpress.org/support/users/torbenlundsgaard/)
 * (@torbenlundsgaard)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/fatal-error-triggered-in-wordpress-admin/#post-18269226)
 * Version 2.3.0 including the fix was just released

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Fatal error triggered in WordPress Admin’ is closed to new replies.

 * ![](https://ps.w.org/gtm-kit/assets/icon.svg?rev=2783020)
 * [GTM Kit - Google Tag Manager & GA4 integration](https://wordpress.org/plugins/gtm-kit/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/gtm-kit/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/gtm-kit/)
 * [Active Topics](https://wordpress.org/support/plugin/gtm-kit/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/gtm-kit/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/gtm-kit/reviews/)

 * 8 replies
 * 2 participants
 * Last reply from: [Torben Lundsgaard](https://wordpress.org/support/users/torbenlundsgaard/)
 * Last activity: [1 year, 4 months ago](https://wordpress.org/support/topic/fatal-error-triggered-in-wordpress-admin/#post-18269226)
 * Status: resolved