• Resolved buddywhatshisname

    (@vhmarkgmailcom)


    PHP error logs show:
    wp_get_sites is <strong>deprecated</strong> since version 4.6.0! Use get_sites() instead
    due to these lines:

    wordfence/lib/wfScanEngine.php:                         $blogIDs = $wpdb->get_col($wpdb->prepare("SELECT blog_id FROM {$wpdb->blogs} WHERE blog_id > %d ORDER BY blog_id ASC", $this->gsbMultisiteBlogOffset)); //Can't use wp_get_sites or get_sites because they return empty at 10k sites
    
    wordfence/lib/wordfenceURLHoover.php:                   $blogIDs = $wpdb->get_col("SELECT blog_id FROM {$wpdb->blogs}"); //Can't use wp_get_sites or get_sites because they return empty at 10k sites
    
    wordfence/lib/wfLog.php:                                        $sites = wp_get_sites(array(
Viewing 1 replies (of 1 total)
  • Plugin Support wfpeter

    (@wfpeter)

    Hi @vhmarkgmailcom,

    The wfLog.php file generally only falls back to the deprecated wp_get_sites() function when get_sites() isn’t available, so is there for compatibility purposes. Aside from you running on an older version of WordPress (which probably isn’t the case), this could be an issue with the order assets are being loaded on your site.

    Another plugin could be loading part of WordPress core in the wrong order, so the correct function isn’t yet available when our code runs. Disabling other plugins is the best way to troubleshoot which may be causing it, though it can still be caused by mu-plugins or drop-ins – so keep those in mind when looking at the tabs/links at the top of WordPress > Plugins > Installed Plugins.

    Thanks,

    Peter.

Viewing 1 replies (of 1 total)
  • The topic ‘wp_get_sites is deprecated; use get_sites()’ is closed to new replies.