Analytify/wp-analytify

Admin_init Hook Issue (With Fix)

Opened this issue · 0 comments

/wp-analytify/classes/analytify-settings.php

admin_init() function should check to make sure the page is set before proceeding. Otherwise, this may conflict with other WP plugins that utilize the admin panel (such as LiteSpeed Cache), without defining a page.

Error:

Warning: Undefined array key "page" in /home/website/public_html/wp-content/plugins/wp-analytify/classes/analytify-settings.php on line 479

Fix:

if ( ('admin.php' === $pagenow) && isset($_GET['page']) && ('analytify-settings' === $_GET['page'] ) || 'options.php' === $pagenow ) {