Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fatal error triggered in WordPress Admin #613

Open
scottybo opened this issue Jan 23, 2025 · 0 comments
Open

Fatal error triggered in WordPress Admin #613

scottybo opened this issue Jan 23, 2025 · 0 comments

Comments

@scottybo
Copy link

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: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

public function enqueue_assets( ?string $hook ): void {
		if ( empty($hook) || strpos( $hook, self::SLUG ) === false ) {
			return;
		}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant