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-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
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:121It 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 notpublic function enqueue_assets( ?string $hook ): void {
if ( empty($hook) || strpos( $hook, self::SLUG ) === false ) {
return;
}
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
The topic ‘Fatal error triggered in WordPress Admin’ is closed to new replies.