• Resolved bewaved

    (@bewaved)


    Hi

    I’m working on wordpress 5.3, with aiowpsec version 4.4.11.

    I’m facing a bug in which wp-includes\vars.php is called after some of the vars are used.

    For example, I have an error on the dashboard Uncaught Error: Call to a member function get_total_site_points() on null in [local]\wp-content\plugins\all-in-one-wp-security-and-firewall\admin\wp-security-dashboard-menu.php:349 because the $pagenow isn’t already set.

    Let me know if I can provide you any other information

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support vupdraft

    (@vupdraft)

    I think the issue might be with your WordPress version, are you able to update it at all?

    Having same error on a multisite setup.

    
    Call to a member function get_total_site_points() on null in /var/app/current/wp-content/plugins/all-in-one-wp-security-and-firewall/admin/wp-security-dashboard-menu.php
    
    Thread Starter bewaved

    (@bewaved)

    I think the issue might be with your WordPress version, are you able to update it at all?

    Hi,

    I update everything and still got the issue. I forgot to mention that the error happens in a multisite installation like @prionkor

    Plugin Support vupdraft

    (@vupdraft)

    It’s possible that this is related to Multisite installs then, I have flagged this up for our development team to review

    Thread Starter bewaved

    (@bewaved)

    Thank you.

    For those needing a workaround, I use the following in /admin/wp-security-admin-init.php line 158 :

    global $pagenow;
            if(empty($pagenow)){
                if ( is_network_admin() ) {
                    preg_match( '#/wp-admin/network/?(.*?)$#i', $_SERVER['PHP_SELF'], $self_matches );
                } elseif ( is_user_admin() ) {
                    preg_match( '#/wp-admin/user/?(.*?)$#i', $_SERVER['PHP_SELF'], $self_matches );
                } else {
                    preg_match( '#/wp-admin/?(.*?)$#i', $_SERVER['PHP_SELF'], $self_matches );
                }
                $pagenow = $self_matches[1];
            }
            $this->is_aiowps_admin_page = ('admin.php' == $pagenow && isset($_GET['page']) && false !== strpos($_GET['page'], AIOWPSEC_MENU_SLUG_PREFIX));

    First and last line are already in the file

    Plugin Support vupdraft

    (@vupdraft)

    @bewaved – thank you for this. Our Developers are currently investigating the issue so we should hopefully have a permanent fix for you soon.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘vars.php included too late’ is closed to new replies.