wp-analytify icon indicating copy to clipboard operation
wp-analytify copied to clipboard

Admin_init Hook Issue (With Fix)

Open DawnWakening opened this issue 2 years ago • 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 ) {

DawnWakening avatar May 13 '23 05:05 DawnWakening